Re: Ogg encapsulation
Ralph Giles <giles-zeIfkxP3e/[email protected]> Thu, 1 Apr 2004 13:08:54 -0800
| Newsgroups | gmane.comp.graphics.mng.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Apr 01, 2004 at 09:05:54PM +0200, Gerard Juyn wrote: > > > 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 I think you need to distinguish 'should check crc' in the we-already- know-it's-valid sense from 'no crc in the datastream'. The latter is really a special feature for applications like mine where the datastream isn't as in the spec. > The bits in iMode (now a uint16) become flags: > > 0x0001 crc present (or not) crc present in datastream (or not) > 0x0010 crc must be checked for ancillary chunks (or not) crc should be checked... > 0x0020 faulty crc on ancillary chunks generate a warning (or not) > 0x0040 faulty crc on ancillary chunks generate an error (or not) There should also be a note that these fields are ignored if the crc is not present/not checked. I think that makes the intent of the flags more clear. > Actually, errors can be ignored as well by #define MNG_SOFTERRORS > This will change the error-handling macros to work like a warning. Sure hope > people know what they're doing if they start messing with that, as it means > the default will then be to ignore errors!!! Quite. I wouldn't worry about abuse particularly. Lazy programmers can find much easier ways of breaking the format. Just look at the history of png support in Photoshop or Internet Exporer. -r -- Send the message body "help" to [email protected]