summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2007-10-30 00:01:25 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2007-10-30 00:01:25 +0000
commit992e78f5f2724bf4649211aaceb353fc0e22f7ee (patch)
tree3e55120770abe0c86cbc13a97646de384985f44d /libavformat/aviobuf.c
parent990e989f242ff0413aa207bc2a760c1b119ae6af (diff)
rename av_crc04C11DB7_update to ff_crc04C11DB7_update and move it to aviobuf.c so it can be reused by other (de)muxers
Originally committed as revision 10873 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 6370f57be6..c186aa2ea3 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -20,6 +20,7 @@
*/
#include "avformat.h"
#include "avio.h"
+#include "crc.h"
#include <stdarg.h>
#define IO_BUFFER_SIZE 32768
@@ -286,6 +287,10 @@ static void fill_buffer(ByteIOContext *s)
}
}
+unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf, unsigned int len){
+ return av_crc(av_crc04C11DB7, checksum, buf, len);
+}
+
unsigned long get_checksum(ByteIOContext *s){
s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_ptr - s->checksum_ptr);
s->update_checksum= NULL;