avformat/avidec: Simplify dshow_block_align based special case detection
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 12 Aug 2015 20:18:58 +0000 (22:18 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 12 Aug 2015 20:51:40 +0000 (22:51 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/avidec.c

index d9427f5..3881251 100644 (file)
@@ -875,9 +875,9 @@ 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 ||
-                        st->codec->codec_id == AV_CODEC_ID_FLAC && 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) {
+                    if ((st->codec->codec_id == AV_CODEC_ID_AAC  ||
+                         st->codec->codec_id == AV_CODEC_ID_FLAC ||
+                         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;
                     }