[MPlayer-dev-eng] Patches for NUT

Rich Felker dalias at aerifal.cx
Sat Feb 4 20:52:42 CET 2006


On Sat, Feb 04, 2006 at 10:49:15AM +0200, Oded Shimon wrote:
> > > > > remove 2^n header restriction, 03-header-repeat.patch .
> > > 
> > > ok
> > 
> > IMO the wording is slightly confusing and makes it sound like the
> > headers must be repeated at EACH 2^n position.
> 
> well, it says SHOULD, not MUST, I haven't got any better ideas.. We can 
> polish it later.

The issue isn't SHOULD/MUST, it's that your wording implied that
headers should appear at _each_ 2^n position.

> > > ok, but that still leaves the issue with abnormally high pts and damaged pts
> > > during binary search
> 
> I'm now inclined back to checksum, because checking checksum in binary 
> search is much easier than varifying timestamp or any other hack.
> 
> As for damaged pts, there is no good fix for that except optional 
> max_pts_diff in header... The player should just not be that 
> dumb...

You should still check and reject invalid pts, even if checksum is
valid. This indicates (most likely) an incorrectly authored file.

> > Hmm..
> > I'm ok with having checksums but I'd like to hear other ideas too.
> 
> We considered adding checksums and shortening startcodes to 4 bytes, but it 
> makes the startcodes very silly: 0x7A56U + ((('N'<<8) + 'M')<<16)
> 
> I also considered 16 bit checksum, as adler32 is kind of a waste on 10-20 
> bytes, but 16 bits is too weak. :/

How is using 32 bits to verify 80-160 bits overkill?

> Maybe we can make only syncpoint startcode 32 bits? It's not ideal, but it 
> does somehow make sense as this startcode is the only one with checksum 
> immediately following it, making the checksum practically part of the 
> startcode.

Forget it.

Rich




More information about the MPlayer-dev-eng mailing list