[FFmpeg-devel] [PATCH 68/72] avcodec/proresenc_anatoliy: Fix memleak upon init error

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Fri Apr 2 19:25:17 EEST 2021


On Fri, Nov 27, 2020 at 6:47 PM Andreas Rheinhardt <
andreas.rheinhardt at gmail.com> wrote:

> A buffer may leak in case of YUVA444P10 with dimensions that are not
> both divisible by 16.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  libavcodec/proresenc_anatoliy.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libavcodec/proresenc_anatoliy.c
> b/libavcodec/proresenc_anatoliy.c
> index 8bc13fd576..85e8cb3aaa 100644
> --- a/libavcodec/proresenc_anatoliy.c
> +++ b/libavcodec/proresenc_anatoliy.c
> @@ -956,6 +956,7 @@ AVCodec ff_prores_aw_encoder = {
>      .capabilities   = AV_CODEC_CAP_FRAME_THREADS,
>      .priv_class     = &proresaw_enc_class,
>      .profiles       = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
> +    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
>  };
>
>  AVCodec ff_prores_encoder = {
> @@ -971,4 +972,5 @@ AVCodec ff_prores_encoder = {
>      .capabilities   = AV_CODEC_CAP_FRAME_THREADS,
>      .priv_class     = &prores_enc_class,
>      .profiles       = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
> +    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
>  };
> --
> 2.25.1
>
>

Will apply.

- Andreas


More information about the ffmpeg-devel mailing list