summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2015-04-21 15:27:57 +0200
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2015-04-23 11:02:45 +0100
commitd31472fde750d3a592ef2232bfafe97dc34a9465 (patch)
tree451cef6d61ef0086db949b924b102f93c5513b42 /ext
parentdfb0e3420696ca7fe8e4e172c0aa522dc95d391f (diff)
oggdemux: fix event leaks
gst_event_replace() takes its own reference on the event so we should drop ours after creating and storing an event using it. This fix leaks which can be reproduced using the validate.http.media_check.vorbis_theora_1_ogg scenario. https://bugzilla.gnome.org/show_bug.cgi?id=748247
Diffstat (limited to 'ext')
-rw-r--r--ext/ogg/gstoggdemux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c
index c027b4378..c61f37466 100644
--- a/ext/ogg/gstoggdemux.c
+++ b/ext/ogg/gstoggdemux.c
@@ -1525,6 +1525,7 @@ gst_ogg_demux_seek_back_after_push_duration_check_unlock (GstOggDemux * ogg)
GST_SEEK_TYPE_SET, 1, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE);
}
gst_event_replace (&ogg->seek_event, event);
+ gst_event_unref (event);
GST_PUSH_UNLOCK (ogg);
g_mutex_lock (&ogg->seek_event_mutex);
g_cond_broadcast (&ogg->seek_event_cond);
@@ -1855,6 +1856,7 @@ gst_ogg_pad_handle_push_mode_state (GstOggPad * pad, ogg_page * page)
gst_event_set_seqnum (sevent, ogg->seqnum);
gst_event_replace (&ogg->seek_event, sevent);
+ gst_event_unref (sevent);
GST_PUSH_UNLOCK (ogg);
g_mutex_lock (&ogg->seek_event_mutex);
g_cond_broadcast (&ogg->seek_event_cond);
@@ -3646,6 +3648,7 @@ gst_ogg_demux_get_duration_push (GstOggDemux * ogg, int flags)
sevent = gst_event_new_seek (1.0, GST_FORMAT_BYTES, flags, GST_SEEK_TYPE_SET,
position, GST_SEEK_TYPE_SET, ogg->push_byte_length - 1);
gst_event_replace (&ogg->seek_event, sevent);
+ gst_event_unref (sevent);
g_mutex_lock (&ogg->seek_event_mutex);
g_cond_broadcast (&ogg->seek_event_cond);
g_mutex_unlock (&ogg->seek_event_mutex);
@@ -3856,6 +3859,7 @@ gst_ogg_demux_perform_seek_push (GstOggDemux * ogg, GstEvent * event)
gst_event_set_seqnum (sevent, gst_event_get_seqnum (event));
gst_event_replace (&ogg->seek_event, sevent);
+ gst_event_unref (sevent);
GST_PUSH_UNLOCK (ogg);
g_mutex_lock (&ogg->seek_event_mutex);
g_cond_broadcast (&ogg->seek_event_cond);