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

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Wed Oct 26 00:39:49 EEST 2022


Andreas Rheinhardt:
> Redundant since dcb29d37d4ffedc84e44df99f8d22ecf27e0f2cd.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at 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



More information about the ffmpeg-devel mailing list