Commit 149d818f authored by Wim Taymans's avatar Wim Taymans
Browse files

ext/ogg/gstoggdemux.c: Make seeking in ogg more accurate again by doing the...

ext/ogg/gstoggdemux.c: Make seeking in ogg more accurate again by doing the more correct granuletime to stream time c...

Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_internal_chain),
(gst_ogg_demux_do_seek), (gst_ogg_demux_read_chain):
Make seeking in ogg more accurate again by doing the more correct
granuletime to stream time conversion.
parent 3ed1d62d
2006-07-26 Wim Taymans <wim@fluendo.com>
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_internal_chain),
(gst_ogg_demux_do_seek), (gst_ogg_demux_read_chain):
Make seeking in ogg more accurate again by doing the more correct
granuletime to stream time conversion.
2006-07-26 Thomas Vander Stichele <thomas at apestaart dot org>
 
* gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_add_full),
......
......@@ -135,7 +135,7 @@ struct _GstOggPad
GstClockTime start_time; /* the timestamp of the first sample */
gint64 first_granule; /* the granulepos of first page == first sample in next page */
GstClockTime first_time; /* the timestamp of the second page */
GstClockTime first_time; /* the timestamp of the second page or granuletime of first page */
ogg_stream_state stream;
......@@ -1878,12 +1878,12 @@ gst_ogg_demux_do_seek (GstOggDemux * ogg, gint64 position, gboolean accurate,
GST_WARNING_OBJECT (ogg, "could not convert granulepos to time");
granuletime = target;
} else {
if (granuletime < pad->first_time)
if (granuletime < pad->start_time)
continue;
GST_LOG_OBJECT (ogg, "granulepos %" G_GINT64_FORMAT "maps to time %"
GST_LOG_OBJECT (ogg, "granulepos %" G_GINT64_FORMAT " maps to time %"
GST_TIME_FORMAT, granulepos, GST_TIME_ARGS (granuletime));
granuletime -= pad->first_time;
granuletime -= pad->start_time;
}
GST_DEBUG_OBJECT (ogg,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment