diff mbox series

[FFmpeg-devel,01/17] avcodec/mpeg12dec: Remove redundant function call

Message ID AS8P250MB07449FCA4121B15E497ED55D8F2F9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 495d738b1b07fd25198760bd932a83fbb17a96b9
Headers show
Series [FFmpeg-devel,01/17] avcodec/mpeg12dec: Remove redundant function call | 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. 23, 2022, 7:34 p.m. UTC
Redundant since dcb29d37d4ffedc84e44df99f8d22ecf27e0f2cd.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
It is of course only redundant if avctx->codec_tag is not allowed
to change after avcodec_open2(); the corresponding option is not
marked with the AV_OPT_FLAG_RUNTIME_PARAM and the above mentioned
commit also relies on this, so I do, too.
Btw: I wonder whether vcr2_init_sequence() should not simply be called
during init.

 libavcodec/mpeg12dec.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Andreas Rheinhardt Oct. 25, 2022, 9:39 p.m. UTC | #1
Andreas Rheinhardt:
> Redundant since dcb29d37d4ffedc84e44df99f8d22ecf27e0f2cd.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> It is of course only redundant if avctx->codec_tag is not allowed
> to change after avcodec_open2(); the corresponding option is not
> marked with the AV_OPT_FLAG_RUNTIME_PARAM and the above mentioned
> commit also relies on this, so I do, too.
> Btw: I wonder whether vcr2_init_sequence() should not simply be called
> during init.
> 
>  libavcodec/mpeg12dec.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
> index 56bf73df11..c942be158e 100644
> --- a/libavcodec/mpeg12dec.c
> +++ b/libavcodec/mpeg12dec.c
> @@ -2797,7 +2797,6 @@ static int mpeg_decode_frame(AVCodecContext *avctx, AVFrame *picture,
>      }
>  #endif
>  
> -    s2->codec_tag = ff_toupper4(avctx->codec_tag);
>      if (s->mpeg_enc_ctx_allocated == 0 && (   s2->codec_tag == AV_RL32("VCR2")
>                                             || s2->codec_tag == AV_RL32("BW10")
>                                            ))

Will apply this patchset tomorrow unless there are objections.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 56bf73df11..c942be158e 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2797,7 +2797,6 @@  static int mpeg_decode_frame(AVCodecContext *avctx, AVFrame *picture,
     }
 #endif
 
-    s2->codec_tag = ff_toupper4(avctx->codec_tag);
     if (s->mpeg_enc_ctx_allocated == 0 && (   s2->codec_tag == AV_RL32("VCR2")
                                            || s2->codec_tag == AV_RL32("BW10")
                                           ))