[FFmpeg-devel] [PATCH] avcodec/pthread_frame: Fix leak of coded side data

James Almer jamrial at gmail.com
Sat Apr 20 18:19:31 EEST 2024


On 4/18/2024 6:30 PM, Andreas Rheinhardt wrote:
> Happens in the mov-elst-ends-betn-b-and-i FATE test with
> frame-threading.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>   libavcodec/pthread_frame.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
> index f19571f6f8..a984ff94d5 100644
> --- a/libavcodec/pthread_frame.c
> +++ b/libavcodec/pthread_frame.c
> @@ -731,6 +731,8 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count)
>               av_packet_free(&ctx->internal->last_pkt_props);
>               av_freep(&ctx->internal);
>               av_buffer_unref(&ctx->hw_frames_ctx);
> +            av_frame_side_data_free(&ctx->decoded_side_data,
> +                                    &ctx->nb_decoded_side_data);

LGTM.


More information about the ffmpeg-devel mailing list