diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-17 01:34:35 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-17 01:46:09 +0200 |
commit | 488383afd1275f6da53e9c83bc209c2f70d768ef (patch) | |
tree | 2b2ef1a327fb9fbd8188587be8475b4f9808c1dc /libavformat/avidec.c | |
parent | b87dd7f82d4df6c6207cab8e40e28e5b3fe81d0f (diff) | |
download | ffmpeg-488383afd1275f6da53e9c83bc209c2f70d768ef.tar.gz |
avformat/avidec: add mp2 to the list of exceptions instead of generally treating dshow_block_align==1 special
Fixes Ticket4552
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r-- | libavformat/avidec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 58b30240dc..5348b44b74 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -129,7 +129,7 @@ static inline int get_duration(AVIStream *ast, int len) { if (ast->sample_size) return len; - else if (ast->dshow_block_align > 1) + else if (ast->dshow_block_align) return (len + ast->dshow_block_align - 1) / ast->dshow_block_align; else return 1; @@ -872,7 +872,8 @@ static int avi_read_header(AVFormatContext *s) st->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_AMV; ast->dshow_block_align = 0; } - if (st->codec->codec_id == AV_CODEC_ID_AAC && ast->dshow_block_align <= 4 && ast->dshow_block_align) { + if (st->codec->codec_id == AV_CODEC_ID_AAC && ast->dshow_block_align <= 4 && ast->dshow_block_align || + st->codec->codec_id == AV_CODEC_ID_MP2 && ast->dshow_block_align <= 4 && ast->dshow_block_align) { av_log(s, AV_LOG_DEBUG, "overriding invalid dshow_block_align of %d\n", ast->dshow_block_align); ast->dshow_block_align = 0; } |