[MPlayer-dev-eng] [PATCH] Ogg seeking fixed

Moritz Bunkus moritz at bunkus.org
Mon Dec 30 10:03:53 CET 2002


Hi.

> is it always requires to skip it?
> (ie no way to check if it's a broken packet or not?)
> (probably not, otherwise you would use that solution :))

I've thought about it, but have not come up with a clean solution
(perhaps it was just too late yesterday). I could make some 'sanity'
checks like packet size (unreliable), packet's packet number
(unreliable) or even analyze its contents (even more unreliable). So
far I don't see that the Ogg libraries are acutally able to tell that a
packet is missing its head at all.

On the other hand the chances that by skipping this first packet I also
skip a valid _key_frame are very, very small (first the seeking must
have ended directly in front of a Ogg page belonging to the video
stream, then this page must be the first for the key frame, and the
frame must be a key frame which don't occur that often ;)).

My (temporarily inserted) debug messages also showed that the code
usually has to read a lot of pages/packets before finding a key frame,
even without skipping the first one.

> feel free to commit.

Done.

-- 
 ==> Ciao, Mosu (Moritz Bunkus)



More information about the MPlayer-dev-eng mailing list