[FFmpeg-devel] [PATCH] Enforce ogg granule position monotonicity
Sun Feb 15 01:01:35 CET 2009
I'm new to Ogg but had problems with certain streams seeming to loop
forever. These streams were corrupted and had negative granule
positions. See inf-loop.ogv. This patch adds a gp sanity check to
Here is what I know for sure:
*"The Granule Position is a signed 64 bit field appearing in the
header of every Ogg page."  (The fact that gp variables in ffmpeg
are almost always uint64_t bothers me.)
*"Granule Position must always increase forward or remain equal from
page to page, be unset, or be zero for a header page. The absolute
time to which any correct sequence of granule position maps must
similarly always increase forward or remain equal." Ibid.
*"A special value of '-1' (in two's complement) indicates that no
packets finish on this page." 
*Libtheora rejects negative granule positions 
What I am uncertain of is what the implications of "unset" are.
Your thoughts would be greatly appreciated, but I know no one here
likes Ogg and don't want to get a lot of whining about how
"broken"/"strange"/"ass backwards" it is.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 464 bytes
Desc: not available
More information about the ffmpeg-devel