baseparse: tune QUERY_SEEKING response
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Mon, 7 Feb 2011 13:46:57 +0000 (14:46 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 8 Apr 2011 17:07:16 +0000 (18:07 +0100)
Even if we currently do not have a duration yet, assume seekable if
it looks like we'll likely be able to determine it later on
(which coincides with needed information to perform seeking).

Fixes #641047.

gst/audioparsers/gstbaseparse.c

index 75c945c..16a6a08 100644 (file)
@@ -3016,7 +3016,9 @@ gst_base_parse_query (GstPad * pad, GstQuery * query)
         if (!(res && seekable)) {
           if (!gst_base_parse_get_duration (parse, GST_FORMAT_TIME, &duration)
               || duration == -1) {
-            seekable = FALSE;
+            /* seekable if we still have a chance to get duration later on */
+            seekable =
+                parse->priv->upstream_seekable && parse->priv->update_interval;
           } else {
             seekable = parse->priv->upstream_seekable;
             GST_LOG_OBJECT (parse, "already determine upstream seekabled: %d",