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