avcodec/mpeg4videode: Eliminate out of loop VOP startcode reading for studio profile
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 29 Apr 2018 17:09:05 +0000 (19:09 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 17 May 2018 00:23:06 +0000 (02:23 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mpeg4videodec.c

index 9ee2f37..9318d7b 100644 (file)
@@ -2931,9 +2931,6 @@ static int decode_studio_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
     if (get_bits_left(gb) <= 32)
         return 0;
 
-    if (get_bits_long(gb, 32) != VOP_STARTCODE)
-        return AVERROR_INVALIDDATA;
-
     s->decode_mb = mpeg4_decode_studio_mb;
 
     decode_smpte_tc(ctx, gb);
@@ -3183,7 +3180,6 @@ int ff_mpeg4_decode_picture_header(Mpeg4DecContext *ctx, GetBitContext *gb)
             if (s->studio_profile) {
                 if ((ret = decode_studio_vol_header(ctx, gb)) < 0)
                     return ret;
-                break;
             } else {
                 if ((ret = decode_vol_header(ctx, gb)) < 0)
                     return ret;