Avoid a memory leak by making sure to release the
current segment on exit if non-NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2676>
gst_hls_rendition_stream_unref (hls_stream->pending_rendition);
hls_stream->pending_rendition = NULL;
}
+
+ if (hls_stream->current_segment) {
+ gst_m3u8_media_segment_unref (hls_stream->current_segment);
+ hls_stream->current_segment = NULL;
+ }
gst_hls_demux_stream_decrypt_end (hls_stream);
G_OBJECT_CLASS (stream_parent_class)->finalize (object);