From c0d4986c8d3fc7b61cce88677a7ca36593a12915 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 31 Mar 2015 00:20:13 +1100 Subject: [PATCH] flv: When passing seek event upstream, hold a ref. In case upstream can't handle the seek, make sure we keep a ref on the event to attempt to handle it ourselves. --- gst/flv/gstflvdemux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c index 9a6928f022..afa1490b30 100644 --- a/gst/flv/gstflvdemux.c +++ b/gst/flv/gstflvdemux.c @@ -3190,9 +3190,12 @@ gst_flv_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEEK: /* Try to push upstream first */ + gst_event_ref (event); ret = gst_pad_push_event (demux->sinkpad, event); - if (ret) + if (ret) { + gst_event_unref (event); break; + } if (demux->random_access) { ret = gst_flv_demux_handle_seek_pull (demux, event, TRUE); } else {