aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-08-04 16:17:09 -0300
committerJames Almer <jamrial@gmail.com>2016-08-04 16:25:32 -0300
commit155f4e963021c5b8d6271d1e34219576dcff6906 (patch)
tree5b3a0630340c389ceb5592d8658902c7e0b885f1 /libavformat
parentf297d1e9e5281e4ed9c0e21b181ba2d0a7735e67 (diff)
downloadffmpeg-155f4e963021c5b8d6271d1e34219576dcff6906.tar.gz
avformat/avio: add a crc callback function for CRC-32 IEEE-LE
Reviewed-by: Nicolas George <george@nsup.org> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avio_internal.h2
-rw-r--r--libavformat/aviobuf.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
index 3867be6e97..fdb323c8f1 100644
--- a/libavformat/avio_internal.h
+++ b/libavformat/avio_internal.h
@@ -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);
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 31e72021f1..f3acb324fa 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -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)
{