avformat/avio: add a crc callback function for CRC-32 IEEE-LE
authorJames Almer <jamrial@gmail.com>
Thu, 4 Aug 2016 19:17:09 +0000 (16:17 -0300)
committerJames Almer <jamrial@gmail.com>
Thu, 4 Aug 2016 19:25:32 +0000 (16:25 -0300)
Reviewed-by: Nicolas George <george@nsup.org>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/avio_internal.h
libavformat/aviobuf.c

index 3867be6..fdb323c 100644 (file)
@@ -111,6 +111,8 @@ void ffio_init_checksum(AVIOContext *s,
 unsigned long ffio_get_checksum(AVIOContext *s);
 unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf,
                                     unsigned int len);
+unsigned long ff_crcEDB88320_update(unsigned long checksum, const uint8_t *buf,
+                                    unsigned int len);
 unsigned long ff_crcA001_update(unsigned long checksum, const uint8_t *buf,
                                 unsigned int len);
 
index 31e7202..f3acb32 100644 (file)
@@ -560,6 +560,12 @@ unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf,
     return av_crc(av_crc_get_table(AV_CRC_32_IEEE), checksum, buf, len);
 }
 
+unsigned long ff_crcEDB88320_update(unsigned long checksum, const uint8_t *buf,
+                                    unsigned int len)
+{
+    return av_crc(av_crc_get_table(AV_CRC_32_IEEE_LE), checksum, buf, len);
+}
+
 unsigned long ff_crcA001_update(unsigned long checksum, const uint8_t *buf,
                                 unsigned int len)
 {