diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-02-27 15:41:30 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-02-27 15:41:30 +0100 |
commit | 5f0a5c3594d05a58ea3300e9acfe5678e734204c (patch) | |
tree | dcf3735292ad60d68f6009da647f95b24ff325f3 /ext/hls | |
parent | 6fb34277290dc7ef1a1c4a401cb4f15771b69eb4 (diff) | |
download | gstreamer-plugins-bad-5f0a5c3594d05a58ea3300e9acfe5678e734204c.tar.gz |
hlsdemux: Unref seek events before returning from the seek handler
Otherwise we leak them all.
Diffstat (limited to 'ext/hls')
-rw-r--r-- | ext/hls/gsthlsdemux.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index bcc045078..72674bf2b 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -337,14 +337,17 @@ gst_hls_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event) if (gst_m3u8_client_is_live (demux->client)) { GST_WARNING_OBJECT (demux, "Received seek event for live stream"); + gst_event_unref (event); return FALSE; } gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start, &stop_type, &stop); - if (format != GST_FORMAT_TIME) + if (format != GST_FORMAT_TIME) { + gst_event_unref (event); return FALSE; + } GST_DEBUG_OBJECT (demux, "seek event, rate: %f start: %" GST_TIME_FORMAT " stop: %" GST_TIME_FORMAT, rate, GST_TIME_ARGS (start), @@ -369,6 +372,7 @@ gst_hls_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event) if (walk == NULL) { GST_WARNING_OBJECT (demux, "Could not find seeked fragment"); + gst_event_unref (event); return FALSE; } @@ -405,6 +409,7 @@ gst_hls_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event) gst_task_start (demux->updates_task); g_rec_mutex_unlock (&demux->stream_lock); + gst_event_unref (event); return TRUE; } default: |