/* Default handlers */
klass->check_valid_frame = gst_base_parse_check_frame;
klass->parse_frame = gst_base_parse_parse_frame;
- klass->event = gst_base_parse_sink_eventfunc;
klass->src_event = gst_base_parse_src_eventfunc;
klass->is_seekable = gst_base_parse_is_seekable;
klass->convert = gst_base_parse_convert;
handled = bclass->event (parse, event);
if (!handled)
+ handled = gst_base_parse_sink_eventfunc (parse, event);
+
+ if (!handled)
ret = gst_pad_event_default (pad, event);
}
if (ret != GST_FLOW_OK) {
GST_DEBUG_OBJECT (parse, "flow: %s", gst_flow_get_name (ret));
- if (GST_FLOW_IS_FATAL (ret)) {
+ if (ret == GST_FLOW_UNEXPECTED) {
+ gst_pad_push_event (parse->srcpad, gst_event_new_eos ());
+ } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
GST_ELEMENT_ERROR (parse, STREAM, FAILED, (NULL),
("streaming task paused, reason: %s", gst_flow_get_name (ret)));
gst_pad_push_event (parse->srcpad, gst_event_new_eos ());
* it directly or fail. For TIME, try upstream, but do it ourselves if
* it fails upstream */
if (format != GST_FORMAT_TIME) {
- return gst_pad_push_event (parse->sinkpad, event);
+ /* default action delegates to upstream */
+ return FALSE;
} else {
gst_event_ref (event);
if (gst_pad_push_event (parse->sinkpad, event)) {