ext/ogg/gstoggdemux.c: Also submit the eos page when trying to find the first timestamp.
authorWim Taymans <wim.taymans@gmail.com>
Tue, 21 Aug 2007 11:42:39 +0000 (11:42 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 21 Aug 2007 11:42:39 +0000 (11:42 +0000)
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_read_chain),
(gst_ogg_demux_collect_chain_info):
Also submit the eos page when trying to find the first timestamp.
See #466717.

ChangeLog
common
ext/ogg/gstoggdemux.c

index fcda2a3..b921370 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-21  Wim Taymans  <wim.taymans@gmail.com>
+
+       * ext/ogg/gstoggdemux.c: (gst_ogg_demux_read_chain),
+       (gst_ogg_demux_collect_chain_info):
+       Also submit the eos page when trying to find the first timestamp.
+       See #466717.
+
 2007-08-17  Sebastian Dröge  <slomo@circular-chaos.org>
 
        * gst-libs/gst/audio/audio.h:
diff --git a/common b/common
index b3fe2a2..9c7f1a6 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit b3fe2a25c1cd0f4b021795d0db7330aeb338da7c
+Subproject commit 9c7f1a63dfed1b2770b5fdaa16e0ae114b2177cf
index d3b0b89..5a6ca2b 100644 (file)
@@ -2396,6 +2396,10 @@ gst_ogg_demux_read_chain (GstOggDemux * ogg, GstOggChain ** res_chain)
       if (pad->serialno == serial) {
         known_serial = TRUE;
 
+        /* submit the page now, this will fill in the start_time when the
+         * internal decoder finds it */
+        gst_ogg_pad_submit_page (pad, &op);
+
         if (!pad->is_skeleton && pad->start_time == -1 && ogg_page_eos (&op)) {
           /* got EOS on a pad before we could find its start_time.
            * We have no chance of finding a start_time for every pad so
@@ -2404,11 +2408,11 @@ gst_ogg_demux_read_chain (GstOggDemux * ogg, GstOggChain ** res_chain)
           done = TRUE;
           break;
         }
-        gst_ogg_pad_submit_page (pad, &op);
       }
       /* the timestamp will be filled in when we submit the pages */
       if (!pad->is_skeleton)
         done &= (pad->start_time != GST_CLOCK_TIME_NONE);
+
       GST_LOG_OBJECT (ogg, "done %08x now %d", pad->serialno, done);
     }
 
@@ -2577,7 +2581,7 @@ gst_ogg_demux_collect_chain_info (GstOggDemux * ogg, GstOggChain * chain)
   gboolean res = TRUE;
 
   chain->total_time = GST_CLOCK_TIME_NONE;
-  chain->segment_start = G_MAXINT64;
+  chain->segment_start = G_MAXUINT64;
 
   GST_DEBUG_OBJECT (ogg, "trying to collect chain info");
 
@@ -2595,7 +2599,7 @@ gst_ogg_demux_collect_chain_info (GstOggDemux * ogg, GstOggChain * chain)
   }
 
   if (chain->segment_stop != GST_CLOCK_TIME_NONE
-      && chain->segment_start != G_MAXINT64)
+      && chain->segment_start != G_MAXUINT64)
     chain->total_time = chain->segment_stop - chain->segment_start;
 
   GST_DEBUG_OBJECT (ogg, "return %d", res);