summaryrefslogtreecommitdiff
path: root/libavcodec/audiotoolboxdec.c
diff options
context:
space:
mode:
authorRodger Combs <rodger.combs@gmail.com>2016-04-07 20:28:32 -0500
committerRodger Combs <rodger.combs@gmail.com>2016-04-13 03:27:29 -0500
commitc890bcbacf321ebd135b952e748f546c9723ec2e (patch)
treeccd1f8bd1a649aca7d87df97a9fb98f2bc71c42e /libavcodec/audiotoolboxdec.c
parentc11157c09a11ad3f80ace4dc6832eef7067db72a (diff)
downloadffmpeg-c890bcbacf321ebd135b952e748f546c9723ec2e.tar.gz
lavf/audiotoolboxdec: only provide block alignment for ILBC
Fixes decode errors for some AVI files
Diffstat (limited to 'libavcodec/audiotoolboxdec.c')
-rw-r--r--libavcodec/audiotoolboxdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c
index 80b1f33922..31e14d4f90 100644
--- a/libavcodec/audiotoolboxdec.c
+++ b/libavcodec/audiotoolboxdec.c
@@ -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,