mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 12:41:05 +00:00
58072914fa
This patch fixes three memory leaks in hlsdemux, one that occurs during normal operation and two that occur during error conditions. The gst_hls_demux_get_next_fragment function calls gst_fragment_get_buffer which increments the reference count on the buffer but gst_hls_demux_get_next_fragment never calls unref on the buffer. This means that the reference count for each downloaded fragment never gets to zero and so its memory is never released. This patch adds a call to gst_buffer_unref after the flags have been updated on the buffer. There is a leak-on-error in gst_hls_demux_decrypt_fragment if it fails to download the key file. If the key fails to download, null is returned without doing an unref on the encrypted fragment. The semantics of gst_hls_demux_decrypt_fragment is that it takes ownership of the encrypted fragment and releases it before returning. There is a leak-on-error in gst_hls_src_buf_to_utf8_playlist in the unlikely event that the gst_buffer_map fails. In the "happy path" operation of gst_hls_src_buf_to_utf8_playlist the buffer gets an unref before the function returns, therefore the error condition must do the same. https://bugzilla.gnome.org/show_bug.cgi?id=710881 |
||
---|---|---|
.. | ||
gstfragmented.h | ||
gstfragmentedplugin.c | ||
gsthlsdemux.c | ||
gsthlsdemux.h | ||
gsthlssink.c | ||
gsthlssink.h | ||
gstm3u8playlist.c | ||
gstm3u8playlist.h | ||
m3u8.c | ||
m3u8.h | ||
Makefile.am |