baseparse: send seek event upstream first

First try to let upstream handle the seek event, then fail if the event is
something we don't understand.
This commit is contained in:
Wim Taymans 2012-07-13 12:05:15 +02:00
parent 02eebca16b
commit 35dbbdb50e

View file

@ -3754,10 +3754,6 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event)
if (rate < 0.0 && parse->priv->pad_mode == GST_PAD_MODE_PUSH)
goto negative_rate;
if (cur_type != GST_SEEK_TYPE_SET ||
(stop_type != GST_SEEK_TYPE_SET && stop_type != GST_SEEK_TYPE_NONE))
goto wrong_type;
/* For any format other than TIME, see if upstream handles
* it directly or fail. For TIME, try upstream, but do it ourselves if
* it fails upstream */
@ -3765,6 +3761,10 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event)
if (format != GST_FORMAT_TIME || res)
goto done;
if (cur_type != GST_SEEK_TYPE_SET ||
(stop_type != GST_SEEK_TYPE_SET && stop_type != GST_SEEK_TYPE_NONE))
goto wrong_type;
/* get flush flag */
flush = flags & GST_SEEK_FLAG_FLUSH;