From 857541ae07fb349a3a21159f34f55c0e93bc881a Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 12 Aug 2022 02:11:34 +1000 Subject: [PATCH] hlsdemux2: Fix some m3u8 segment leaks Make sure unref m3u8 segments in some missed paths. Part-of: --- .../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 d93308d543..ea7e3035c5 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c @@ -2330,11 +2330,13 @@ gst_hls_demux_stream_update_media_playlist (GstHLSDemux * demux, GST_DEBUG_OBJECT (stream, "Partial segments we were playing became unavailable. Will try and resync"); stream->in_partial_segments = FALSE; + gst_m3u8_media_segment_unref (new_segment); new_segment = NULL; } else if (stream->part_idx >= new_segment->partial_segments->len) { GST_DEBUG_OBJECT (stream, "After playlist reload, there are no more partial segments to play in the current segment. Resyncing"); stream->in_partial_segments = FALSE; + gst_m3u8_media_segment_unref (new_segment); new_segment = NULL; } }