[FFmpeg-cvslog] avformat/avio: add a crc callback function for CRC-32 IEEE-LE

James Almer git at videolan.org
Thu Aug 4 22:27:48 EEST 2016


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Aug  4 16:17:09 2016 -0300| [155f4e963021c5b8d6271d1e34219576dcff6906] | committer: James Almer

avformat/avio: add a crc callback function for CRC-32 IEEE-LE

Reviewed-by: Nicolas George <george at nsup.org>
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=155f4e963021c5b8d6271d1e34219576dcff6906
---

 libavformat/avio_internal.h | 2 ++
 libavformat/aviobuf.c       | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
index 3867be6..fdb323c 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 31e7202..f3acb32 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)
 {



More information about the ffmpeg-cvslog mailing list