mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
hlsdemux2: Free current_segment on finalize
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>
This commit is contained in:
parent
9272943bc7
commit
76e0333213
1 changed files with 5 additions and 0 deletions
|
@ -1684,6 +1684,11 @@ gst_hls_demux_stream_finalize (GObject * object)
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue