Re: Ogg encapsulation

"Gerard Juyn" <gjuyn-qWit8jRvyhVmR6Xm/[email protected]> Thu, 1 Apr 2004 19:17:38 +0200
Newsgroups gmane.comp.graphics.mng.general
Organization Triple-T
Message-ID <406C6AD2.28818.33890B4F@localhost>
> OK. But to be generally useful we ought to set up two flags (or a 3-way
> int) then; one that says ignore the CRC and another that says there's no
> CRC.  It's a little more (but not very) complex for libmng to avoid
> adding and subtracting 4 bytes to/from the expected length a couple of
> places.

mng_retcode mng_set_checkcrc (mng_handle hHandle, 
					mng_uint8 iMode);
iMode can be:
0x00 = crc in datastream & must be checked (default)
0x01 = crc in datastream, must not be checked
0x02 = no crc in datastream, no checking

Later perhaps even
0x03 = crc in datastream, external checking thru callback-routine

Then of course it's very easy to see a lazy programmer encountering a PNG 
with invalid CRC's and turning this function on with 0x01 in his test-code, 
forgetting to remove it when the code goes live, and this code happens to be 
part of a mainstream software-tool considered by the general public as a de-
facto standard, and then them finding those flaky PNG's which work in the 
mainstream tool and not in some ("third-rated") open-source tool, and we all 
know who's going to get the blame... (again!)

Of course I'm probably seeing ghosts, but then again....
Other views please!?!

Gerard


--
Send the message body "help" to [email protected]