From 91e43048cfe06cf023356e9c1e7ccf9f0a29595a Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sun, 7 Aug 2022 20:56:49 +1000 Subject: [PATCH] hlsdemux2: Fix buffer leak when resynching Unref the buffer in gst_hls_demux_handle_buffer() when returning GST_ADAPTIVE_DEMUX_FLOW_LOST_SYNC Part-of: --- subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c index f328cbe..edde098 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c @@ -1484,6 +1484,8 @@ gst_hls_demux_handle_buffer (GstAdaptiveDemux * demux, */ if (hls_stream->current_segment == NULL) { GST_WARNING_OBJECT (stream, "Lost sync"); + /* Drop the buffer */ + gst_buffer_unref (buffer); return GST_ADAPTIVE_DEMUX_FLOW_LOST_SYNC; } -- 2.7.4