diff --git a/ChangeLog b/ChangeLog index 788da86e34..352cc2ff82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-07-26 Wim Taymans + + * 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 * gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_add_full), diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 361c30952d..a76f5b4278 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -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,