avcodec/extract_extradata_bsf: add missing break statement to extract_extradata_vc1
authorJames Almer <jamrial@gmail.com>
Tue, 28 Mar 2017 04:14:17 +0000 (01:14 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 28 Mar 2017 04:14:17 +0000 (01:14 -0300)
libavcodec/extract_extradata_bsf.c

index e9b3791..1e92f8e 100644 (file)
@@ -145,8 +145,10 @@ static int extract_extradata_vc1(AVBSFContext *ctx, AVPacket *pkt,
         ptr = avpriv_find_start_code(ptr, end, &state);
         if (state == VC1_CODE_SEQHDR || state == VC1_CODE_ENTRYPOINT) {
             has_extradata = 1;
-        } else if (has_extradata && IS_MARKER(state))
+        } else if (has_extradata && IS_MARKER(state)) {
             extradata_size = ptr - 4 - pkt->data;
+            break;
+        }
     }
 
     if (extradata_size) {