diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-06-06 14:56:52 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-06-06 14:57:27 +0200 |
commit | 0fe56cc0d6827a4a0a6ce9637dbb394c0d87a6ef (patch) | |
tree | baf87395f13f62e2b84638a608855b011094b418 | |
parent | 8e0adba996d81b469078eeeefeeecfb772439743 (diff) |
flvdemux: First try upstream when handling seek events/queries
-rw-r--r-- | gst/flv/gstflvdemux.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c index 552484e9b..35bbc42da 100644 --- a/gst/flv/gstflvdemux.c +++ b/gst/flv/gstflvdemux.c @@ -2411,6 +2411,13 @@ wrong_format: static gboolean gst_flv_demux_handle_seek_push (GstFlvDemux * demux, GstEvent * event) { + /* First try upstream */ + if (gst_pad_push_event (demux->sinkpad, gst_event_ref (event))) { + GST_DEBUG_OBJECT (demux, "Upstream successfully seeked"); + gst_event_unref (event); + return TRUE; + } + if (!demux->indexed) { guint64 seek_offset = 0; gboolean building_index; @@ -2859,6 +2866,17 @@ gst_flv_demux_query (GstPad * pad, GstQuery * query) case GST_QUERY_SEEKING:{ GstFormat fmt; + /* First ask upstream */ + if (gst_pad_peer_query (demux->sinkpad, query)) { + gboolean seekable; + + gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL); + if (seekable) { + res = TRUE; + break; + } + } + gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL); res = TRUE; if (fmt != GST_FORMAT_TIME || !demux->index) { |