]> git.sesse.net Git - ffmpeg/commitdiff
lavf/audiotoolboxdec: only provide block alignment for ILBC
authorRodger Combs <rodger.combs@gmail.com>
Fri, 8 Apr 2016 01:28:32 +0000 (20:28 -0500)
committerRodger Combs <rodger.combs@gmail.com>
Wed, 13 Apr 2016 08:27:29 +0000 (03:27 -0500)
Fixes decode errors for some AVI files

libavcodec/audiotoolboxdec.c

index 80b1f339229ad4b870e73847e82028b10a367f4f..31e14d4f90806f88c08e76bcfbc45e4da632f8dc 100644 (file)
@@ -301,7 +301,7 @@ static av_cold int ffat_create_decoder(AVCodecContext *avctx, AVPacket *pkt)
 
     AudioStreamBasicDescription in_format = {
         .mFormatID = ffat_get_format_id(avctx->codec_id, avctx->profile),
-        .mBytesPerPacket = avctx->block_align,
+        .mBytesPerPacket = (avctx->codec_id == AV_CODEC_ID_ILBC) ? avctx->block_align : 0,
     };
     AudioStreamBasicDescription out_format = {
         .mFormatID = kAudioFormatLinearPCM,