lavf/audiotoolboxdec: only provide block alignment for ILBC

Fixes decode errors for some AVI files
parent c11157c0
...@@ -301,7 +301,7 @@ static av_cold int ffat_create_decoder(AVCodecContext *avctx, AVPacket *pkt) ...@@ -301,7 +301,7 @@ static av_cold int ffat_create_decoder(AVCodecContext *avctx, AVPacket *pkt)
AudioStreamBasicDescription in_format = { AudioStreamBasicDescription in_format = {
.mFormatID = ffat_get_format_id(avctx->codec_id, avctx->profile), .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 = { AudioStreamBasicDescription out_format = {
.mFormatID = kAudioFormatLinearPCM, .mFormatID = kAudioFormatLinearPCM,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment