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

Andreas Rheinhardt git at videolan.org
Sun Apr 21 14:42:44 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Apr 18 23:18:06 2024 +0200| [277f051ff6a9c25a8bbfee3e69f74632d0d83252] | committer: Andreas Rheinhardt

avcodec/pthread_frame: Fix leak of coded side data

Happens in the mov-elst-ends-betn-b-and-i and mov-ibi-elst-starts-b
FATE tests with frame-threading.

Reviewed-by: James Almer <jamrial at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=277f051ff6a9c25a8bbfee3e69f74632d0d83252
---

 libavcodec/pthread_frame.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index a30312021e..67f09c1f48 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);
         }
 
         av_frame_free(&p->frame);



More information about the ffmpeg-cvslog mailing list