mpegtsbase: don't push events upstream in pull mode

In pull mode, don't push the seek event upstream.
This commit is contained in:
Wim Taymans 2012-04-30 11:05:20 +02:00
parent cd001d7b8e
commit eaf4d97815

View file

@ -1606,11 +1606,17 @@ mpegts_base_handle_seek_event (MpegTSBase * base, GstPad * pad,
if (format != GST_FORMAT_TIME)
return FALSE;
/* First try if upstream supports seeking in TIME format */
if (gst_pad_push_event (base->sinkpad, gst_event_ref (event))) {
GST_DEBUG ("upstream handled SEEK event");
gst_event_unref (event);
return TRUE;
if (base->mode == BASE_MODE_PUSHING) {
/* First try if upstream supports seeking in TIME format */
if (gst_pad_push_event (base->sinkpad, gst_event_ref (event))) {
GST_DEBUG ("upstream handled SEEK event");
gst_event_unref (event);
return TRUE;
}
/* FIXME : Actually ... it is supported, we just need to convert
* the seek event to BYTES */
GST_ERROR ("seeking in push mode not supported");
goto push_mode;
}
GST_DEBUG ("seek event, rate: %f start: %" GST_TIME_FORMAT
@ -1619,13 +1625,6 @@ mpegts_base_handle_seek_event (MpegTSBase * base, GstPad * pad,
flush = flags & GST_SEEK_FLAG_FLUSH;
if (base->mode == BASE_MODE_PUSHING) {
/* FIXME : Actually ... it is supported, we just need to convert
* the seek event to BYTES */
GST_ERROR ("seeking in push mode not supported");
goto push_mode;
}
/* stop streaming, either by flushing or by pausing the task */
base->mode = BASE_MODE_SEEKING;
if (flush) {