Fix muxing QDM2 mono into caf.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 27 Jun 2013 09:09:02 +0000 (11:09 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Fri, 28 Jun 2013 07:04:16 +0000 (09:04 +0200)
libavformat/cafenc.c

index 11bb055..cd3a0be 100644 (file)
@@ -86,8 +86,9 @@ static uint32_t samples_per_packet(enum AVCodecID codec_id, int channels) {
         return 1152;
     case AV_CODEC_ID_AC3:
         return 1536;
-    case AV_CODEC_ID_ALAC:
     case AV_CODEC_ID_QDM2:
+        return 2048 * channels;
+    case AV_CODEC_ID_ALAC:
         return 4096;
     case AV_CODEC_ID_ADPCM_IMA_WAV:
         return (1024 - 4 * channels) * 8 / (4 * channels) + 1;