if (!handled)
ret = gst_pad_event_default (pad, event);
- else
- gst_event_unref (event);
gst_object_unref (parse);
return ret;
* it fails upstream */
if (format != GST_FORMAT_TIME) {
/* default action delegates to upstream */
- return FALSE;
+ res = FALSE;
+ goto done;
} else {
gst_event_ref (event);
- if (gst_pad_push_event (parse->sinkpad, event)) {
- return TRUE;
+ if ((res = gst_pad_push_event (parse->sinkpad, event))) {
+ goto done;
}
}
(GstTaskFunction) gst_base_parse_loop, parse->sinkpad);
GST_PAD_STREAM_UNLOCK (parse->sinkpad);
+
+ /* handled seek */
+ res = TRUE;
} else {
GstEvent *new_event;
GstBaseParseSeek *seek;
}
done:
+ /* handled event is ours to free */
+ if (res)
+ gst_event_unref (event);
return res;
/* ERRORS */