oggdemux: fix unknown duration playing Ogg over HTTP
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Wed, 20 Jul 2016 10:47:48 +0000 (11:47 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 21 Jul 2016 09:40:07 +0000 (10:40 +0100)
If the duration is not known from the chain, it might be known
by the startup seek.

This fixes failure to seek.

Merged with a patch from Tim-Philipp Müller <tim@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=768991

ext/ogg/gstoggdemux.c

index f84d0e0..e71bea8 100644 (file)
@@ -344,7 +344,9 @@ gst_ogg_pad_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
               else
                 stop = MAX (idx_time, stop);
             } else {
-              stop = -1;        /* we've no clue, sadly, without seeking */
+              stop = ogg->push_time_length;
+              if (stop == -1)
+                stop = ogg->total_time;
             }
           }
         }