oggdemux: Make bisecting fully accurate
authorMathieu Duponchelle <mathieu.duponchelle@epitech.eu>
Sat, 13 Jul 2013 23:42:52 +0000 (01:42 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Mon, 15 Jul 2013 08:34:00 +0000 (10:34 +0200)
commit905fe0f4ca3fe6760fb6b4a77bcc5c982605f120
tree34f8c5e582cc71c0548d60288479af0f72f57455
parentaffd9f37aaa350845254c7da997cbfd9ddfbbb8c
oggdemux: Make bisecting fully accurate

When bisecting after an earliest time has been found, we need
to only consider the stream for which the earliest time was found.

Before, the following scenario could be and was encountered:

a) Find the earliest time for stream X
b) bisect and find a page which granuletime is indeed < target, but
   contains another stream.
c) decide to seek at the wrong offset, sometimes inferior to
   the real one, in which case the error was undected or
d) the offset was superior, and thus the actual target keyframe was
   not processed, and packets were skipped waiting
   for a granulepos.

https://bugzilla.gnome.org/show_bug.cgi?id=700537
ext/ogg/gstoggdemux.c