[NUT-devel] possible error in the spec for the index

Michael Niedermayer michaelni at gmx.at
Sun Nov 12 00:33:46 CET 2006


Hi

when trying to read the index from a libnut generated file i stumbled
across a odd problem in how the index is stored, the problem is that

from nut.txt:
has_keyframe
    indicates whether this stream has a keyframe between this syncpoint and
    the last syncpoint.

what is "this syncpoint", libnut seems to use syncpoint[0] for has_keyframe[0]
as "this" but with that definition
has_keyframe[0]=0 (which is harmless)
more problematic is
for(; j<n && j<syncpoints; j++){

a keyframe after the last syncpoint would be has_keyframe[syncpoints]
and so the pts/eor loop wouldnt be run on it -> we would know there
is a keyframe but we dont not know its pts

obvious solutions (assuiming i didnt miss something)
1. ignore it, its just one keyframe per stream which isnt in the index
2. redefine has_keyframe so [0] is for sp[0] ... sp[1]
3. change j<syncpoints to j<syncpoints+1

comments?

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is



More information about the NUT-devel mailing list