diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-04-05 12:02:10 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-04-05 12:02:10 +0000 |
commit | ee9f36a88eb3e2706ea659acb0ca80c414fa5d8a (patch) | |
tree | fad9f203172659788226c6e762d661ef97014be7 /libavformat/crc.c | |
parent | 5e9b83f5d7e5b8c9182e2ee6a1baf3e86aec0a17 (diff) | |
download | ffmpeg-ee9f36a88eb3e2706ea659acb0ca80c414fa5d8a.tar.gz |
checksuming for nut & nice checksum API for libavformat
Originally committed as revision 2969 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/crc.c')
-rw-r--r-- | libavformat/crc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/crc.c b/libavformat/crc.c index c9f8360a51..1b8d6a4df3 100644 --- a/libavformat/crc.c +++ b/libavformat/crc.c @@ -33,7 +33,7 @@ #define DO8(buf) DO4(buf); DO4(buf); #define DO16(buf) DO8(buf); DO8(buf); -static uint32_t adler32(uint32_t adler, const uint8_t *buf, unsigned int len) +unsigned long update_adler32(unsigned long adler, const uint8_t *buf, unsigned int len) { unsigned long s1 = adler & 0xffff; unsigned long s2 = (adler >> 16) & 0xffff; @@ -66,7 +66,7 @@ static int crc_write_header(struct AVFormatContext *s) CRCState *crc = s->priv_data; /* init CRC */ - crc->crcval = adler32(0, NULL, 0); + crc->crcval = update_adler32(0, NULL, 0); return 0; } @@ -76,7 +76,7 @@ static int crc_write_packet(struct AVFormatContext *s, const uint8_t *buf, int size, int64_t pts) { CRCState *crc = s->priv_data; - crc->crcval = adler32(crc->crcval, buf, size); + crc->crcval = update_adler32(crc->crcval, buf, size); return 0; } |