[FFmpeg-devel] [PATCH] Check codec_whitelist before reinitializing AVCtx.priv_data.

Anton Khirnov anton at khirnov.net
Sun Sep 1 13:43:07 EEST 2024


Quoting Dale Curtis (2024-08-01 01:18:14)
> diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
> index 214dca4566..f189263ff9 100644
> --- a/libavcodec/avcodec.c
> +++ b/libavcodec/avcodec.c
> @@ -174,6 +174,14 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
>      if (avctx->extradata_size < 0 || avctx->extradata_size >= FF_MAX_EXTRADATA_SIZE)
>          return AVERROR(EINVAL);
>  
> +    if ((ret = av_opt_set_dict(avctx, options)) < 0)
> +        return AVERROR(EINVAL);

Should be return ret;

Pushed with that change and a reworded commit message to make it clearer
what the issue is.

Sorry for the delay.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list