mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
hls: Fix various leak on hlsdemux and m3u8
* default_variant should be freed, it holds ref. * GstHLSMedia holds GstM3U8 ref. * gst_m3u8_get_next_fragment() increases ref count. https://bugzilla.gnome.org/show_bug.cgi?id=778073
This commit is contained in:
parent
e28ddbdf77
commit
5bd4bc8080
2 changed files with 7 additions and 0 deletions
|
@ -1114,6 +1114,8 @@ gst_hls_demux_update_fragment_info (GstAdaptiveDemuxStream * stream)
|
|||
if (discont)
|
||||
stream->discont = TRUE;
|
||||
|
||||
gst_m3u8_media_file_unref (file);
|
||||
|
||||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -1182,9 +1182,12 @@ gst_hls_media_unref (GstHLSMedia * media)
|
|||
{
|
||||
g_assert (media != NULL && media->ref_count > 0);
|
||||
if (g_atomic_int_dec_and_test (&media->ref_count)) {
|
||||
if (media->playlist)
|
||||
gst_m3u8_unref (media->playlist);
|
||||
g_free (media->group_id);
|
||||
g_free (media->name);
|
||||
g_free (media->uri);
|
||||
g_free (media->lang);
|
||||
g_free (media);
|
||||
}
|
||||
}
|
||||
|
@ -1402,6 +1405,8 @@ gst_hls_master_playlist_unref (GstHLSMasterPlaylist * playlist)
|
|||
(GDestroyNotify) gst_hls_variant_stream_unref);
|
||||
g_list_free_full (playlist->iframe_variants,
|
||||
(GDestroyNotify) gst_hls_variant_stream_unref);
|
||||
if (playlist->default_variant)
|
||||
gst_hls_variant_stream_unref (playlist->default_variant);
|
||||
g_free (playlist->last_data);
|
||||
g_free (playlist);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue