avcodec/mpeg12dec: Limit progressive_seq reinitilaization to where the resolution...
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 27 Jun 2014 22:16:09 +0000 (00:16 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 27 Jun 2014 22:16:09 +0000 (00:16 +0200)
Fixes Ticket3743

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

index 92193ce..79fc502 100644 (file)
@@ -1263,7 +1263,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
         s1->save_width           != s->width                ||
         s1->save_height          != s->height               ||
         s1->save_aspect_info     != s->aspect_ratio_info    ||
-        (s1->save_progressive_seq != s->progressive_sequence && (s->height&31)) ||
+        (s1->save_progressive_seq != s->progressive_sequence && FFALIGN(s->height, 16) != FFALIGN(s->height, 32)) ||
         0) {
         if (s1->mpeg_enc_ctx_allocated) {
             ParseContext pc = s->parse_context;