I'm trying to generate the 4-byte crc code for the comment tag in an ogg file.. Can anyone point me to a function where this is done? Unfortunately, I can't use the lib directly, and the crc function I did find in it doesn't seem to do what I want directly. But, that might mean I'm not feeding it the right chunk of data. Any details would be helpful - yes I read the docs and I still don't quote understand. Thanks. -G <p><p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Thu, 7 Aug 2003 21:59:23 -0500, Greg Hazel <gah@thalassocracy.org> wrote:> find in it doesn't seem to do what I want directly. But, that might mean > I'm not feeding it the right chunk of data.Or you're forgetting to do the necessary pre-or post-image work. Do you xor with -1L at the end? I don't know what exact poly (0xEDB88320 I'd guess) or params vorbis is using, but experience tells me that problems with matching CRCs are often due to the above. --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Hello ! On Friday 08 August 2003 04:59, Greg Hazel wrote:> I'm trying to generate the 4-byte crc code for the comment tag in an ogg > file.. Can anyone point me to a function where this is done? > Unfortunately, I can't use the lib directly, and the crc function I did > find in it doesn't seem to do what I want directly. But, that might mean > I'm not feeding it the right chunk of data. > > Any details would be helpful - yes I read the docs and I still don't > quote understand. Thanks.Did you set the CRC field to zero before calculating the CRC? Is there another way (i.e. not setting this to zero) ? I attached a simple program that reads the first oggpage (and much more) and calculates the CRC. I hope that the first page is always 0x3a bytes. Dominik -------------- next part -------------- A non-text attachment was scrubbed... Name: crc.c Type: text/x-csrc Size: 2271 bytes Desc: crc.c Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20030808/edc6a7f5/crc-0001.c