From ce4f0d574607076e86b5a0392b1fbbbd3a6aac86 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Fri, 5 Apr 2024 02:28:53 +0900 Subject: [PATCH] avviddec: Fix AVPacket leak av_packet_unref() does not release allocated memory. av_packet_free() is the correct free function. Part-of: --- subprojects/gst-libav/ext/libav/gstavviddec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-libav/ext/libav/gstavviddec.c b/subprojects/gst-libav/ext/libav/gstavviddec.c index 3cd2d4f409..4ad973211a 100644 --- a/subprojects/gst-libav/ext/libav/gstavviddec.c +++ b/subprojects/gst-libav/ext/libav/gstavviddec.c @@ -2277,10 +2277,10 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder, GST_VIDEO_DECODER_STREAM_UNLOCK (ffmpegdec); if (avcodec_send_packet (ffmpegdec->context, packet) < 0) { GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec); - av_packet_unref (packet); + av_packet_free (&packet); goto send_packet_failed; } - av_packet_unref (packet); + av_packet_free (&packet); GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec); do {