oggdemux: use the chain begin_time instead of our counter
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 23 Feb 2010 10:41:20 +0000 (11:41 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 23 Feb 2010 11:26:15 +0000 (12:26 +0100)
We update the passed begintime argument to narrow our search region in the
binary search. This means that it does not always contain the chain begin time
after a couple of bisects. Use the real chain->begin_time to bring the
granuletime to the time in the chain instead.

Fixes #610005

ext/ogg/gstoggdemux.c

index 84f3ad7..d8f00ef 100644 (file)
@@ -1791,7 +1791,7 @@ do_binary_search (GstOggDemux * ogg, GstOggChain * chain, gint64 begin,
             GST_TIME_FORMAT, granulepos, GST_TIME_ARGS (granuletime));
 
         granuletime -= pad->start_time;
-        granuletime += begintime;
+        granuletime += chain->begin_time;
 
         GST_DEBUG_OBJECT (ogg,
             "found page with granule %" G_GINT64_FORMAT " and time %"