avidec: override sample size of 1024 for VBR AAC
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Oct 2012 14:36:46 +0000 (16:36 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Oct 2012 14:48:58 +0000 (16:48 +0200)
Fixes Ticket1755

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/avidec.c

index b4c5fe8..185c67c 100644 (file)
@@ -681,6 +681,10 @@ static int avi_read_header(AVFormatContext *s)
                         av_log(s, AV_LOG_DEBUG, "overriding invalid dshow_block_align of %d\n", ast->dshow_block_align);
                         ast->dshow_block_align = 0;
                     }
+                    if(st->codec->codec_id == AV_CODEC_ID_AAC && ast->dshow_block_align == 1024 && ast->sample_size == 1024) {
+                        av_log(s, AV_LOG_DEBUG, "overriding sample_size\n", ast->dshow_block_align);
+                        ast->sample_size = 0;
+                    }
                     break;
                 case AVMEDIA_TYPE_SUBTITLE:
                     st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;