]> git.sesse.net Git - vlc/commit
Do not delay processing of the first data page of the last logical stream
authorVincent Penquerc'h <ogg.k.ogg.k@googlemail.com>
Tue, 11 Nov 2008 20:42:31 +0000 (20:42 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 18 Nov 2008 18:19:21 +0000 (19:19 +0100)
commit442eb5a4352ed514644c7e3d0e09cc4734ed3166
treebf699400de104fdf86d1202e2efaa7dd790df74b
parent4e54fc160224190187431e60a8a3b14d767b65ee
Do not delay processing of the first data page of the last logical stream

The first data page of a physical stream is stored in the relevant logical stream
in Ogg_FindLogicalStreams. Therefore, we must not read a page and only update the
stream it belongs to if we haven't processed this first page yet. If we do, we
will only process that first page whenever we find the second page for this stream.
While this is fine for Vorbis and Theora, which are continuous codecs, which means
the second page will arrive real quick, this is not fine for Kate, whose second
data page will typically arrive much later.
This means it is now possible to seek right at the start of a stream where the last
logical stream is Kate, without having to wait for the second data page to unblock
the first one, which is the one that triggers the 'no more headers to backup' code.
And, as we all know, seeking without having backed up all headers is bad, since the
codec will fail to initialize if it's missing its headers.

Signed-off-by: Laurent Aimar <fenrir@videolan.org>
modules/demux/ogg.c