ext/ogg/gstoggdemux.c: Also submit the eos page when trying to find the first timestamp.

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.
This commit is contained in:
Wim Taymans 2007-08-21 11:42:39 +00:00
parent 846ddaa550
commit 9a32184a05
3 changed files with 15 additions and 4 deletions

View file

@ -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> 2007-08-17 Sebastian Dröge <slomo@circular-chaos.org>
* gst-libs/gst/audio/audio.h: * gst-libs/gst/audio/audio.h:

2
common

@ -1 +1 @@
Subproject commit b3fe2a25c1cd0f4b021795d0db7330aeb338da7c Subproject commit 9c7f1a63dfed1b2770b5fdaa16e0ae114b2177cf

View file

@ -2396,6 +2396,10 @@ gst_ogg_demux_read_chain (GstOggDemux * ogg, GstOggChain ** res_chain)
if (pad->serialno == serial) { if (pad->serialno == serial) {
known_serial = TRUE; 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)) { if (!pad->is_skeleton && pad->start_time == -1 && ogg_page_eos (&op)) {
/* got EOS on a pad before we could find its start_time. /* 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 * 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; done = TRUE;
break; break;
} }
gst_ogg_pad_submit_page (pad, &op);
} }
/* the timestamp will be filled in when we submit the pages */ /* the timestamp will be filled in when we submit the pages */
if (!pad->is_skeleton) if (!pad->is_skeleton)
done &= (pad->start_time != GST_CLOCK_TIME_NONE); done &= (pad->start_time != GST_CLOCK_TIME_NONE);
GST_LOG_OBJECT (ogg, "done %08x now %d", pad->serialno, done); 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; gboolean res = TRUE;
chain->total_time = GST_CLOCK_TIME_NONE; 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"); 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 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; chain->total_time = chain->segment_stop - chain->segment_start;
GST_DEBUG_OBJECT (ogg, "return %d", res); GST_DEBUG_OBJECT (ogg, "return %d", res);