[MOVED FROM GST-P-FARSIGHT] Unref event instead of leaking it

20080418192941-3e2dc-352e25f6ab291612be1dc139790303a1333f65d7.gz
This commit is contained in:
Olivier Crete 2008-04-18 19:29:41 +00:00 committed by Edward Hervey
parent 696a8dc188
commit 244bf6f250

View file

@ -524,6 +524,8 @@ gst_live_adder_sink_event (GstPad * pad, GstEvent * event)
gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format, gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format,
&start, &stop, &time); &start, &stop, &time);
gst_event_unref (event);
/* we need time for now */ /* we need time for now */
if (format != GST_FORMAT_TIME) if (format != GST_FORMAT_TIME)
goto newseg_wrong_format; goto newseg_wrong_format;
@ -540,8 +542,6 @@ gst_live_adder_sink_event (GstPad * pad, GstEvent * event)
gst_segment_set_newsegment_full (&padprivate->segment, update, gst_segment_set_newsegment_full (&padprivate->segment, update,
rate, arate, format, start, stop, time); rate, arate, format, start, stop, time);
GST_OBJECT_UNLOCK (adder); GST_OBJECT_UNLOCK (adder);
gst_event_unref (event);
break; break;
} }
case GST_EVENT_FLUSH_START: case GST_EVENT_FLUSH_START: