baseparse: fix seek event ref handling

This commit is contained in:
Mark Nauwelaerts 2010-06-15 15:34:05 +02:00
parent 484af544bf
commit 112df6cc0e

View file

@ -696,6 +696,8 @@ gst_base_parse_src_event (GstPad * pad, GstEvent * event)
if (!handled) if (!handled)
ret = gst_pad_event_default (pad, event); ret = gst_pad_event_default (pad, event);
else
gst_event_unref (event);
gst_object_unref (parse); gst_object_unref (parse);
return ret; return ret;
@ -724,7 +726,6 @@ gst_base_parse_src_eventfunc (GstBaseParse * parse, GstEvent * event)
{ {
if (bclass->is_seekable (parse)) { if (bclass->is_seekable (parse)) {
handled = gst_base_parse_handle_seek (parse, event); handled = gst_base_parse_handle_seek (parse, event);
gst_event_unref (event);
} }
break; break;
} }
@ -2066,7 +2067,6 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event)
} else { } else {
gst_event_ref (event); gst_event_ref (event);
if (gst_pad_push_event (parse->sinkpad, event)) { if (gst_pad_push_event (parse->sinkpad, event)) {
gst_event_unref (event);
return TRUE; return TRUE;
} }
} }