[vorbis-dev] crc

Dominik Kuhlen dkuhlen at fhm.edu
Fri Aug 8 12:25:52 PDT 2003


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


More information about the Vorbis-dev mailing list