diff mbox series

[FFmpeg-devel,05/19] avcodec/vc1_parser: Set parse_only only once

Message ID GV1P250MB07370756436FB6513E2F13578F349@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 2b0f73321d779dfddf12b559b0d12751ad1871c7
Headers show
Series [FFmpeg-devel,01/19] avcodec/vc1: Don't check for AVCodecContext.codec | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 30, 2022, 11:56 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/vc1_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c
index 8257e0ccfa..d57fcdf1e1 100644
--- a/libavcodec/vc1_parser.c
+++ b/libavcodec/vc1_parser.c
@@ -65,7 +65,6 @@  static void vc1_extract_header(AVCodecParserContext *s, AVCodecContext *avctx,
     GetBitContext gb;
     int ret;
     vpc->v.s.avctx = avctx;
-    vpc->v.parse_only = 1;
     init_get_bits8(&gb, buf, buf_size);
     switch (vpc->prev_start_code) {
     case VC1_CODE_SEQHDR & 0xFF:
@@ -260,6 +259,7 @@  static av_cold int vc1_parse_init(AVCodecParserContext *s)
     VC1ParseContext *vpc = s->priv_data;
     vpc->v.s.slice_context_count = 1;
     vpc->v.first_pic_header_flag = 1;
+    vpc->v.parse_only = 1;
     vpc->prev_start_code = 0;
     vpc->bytes_to_skip = 0;
     vpc->unesc_index = 0;