summaryrefslogtreecommitdiff
path: root/libavutil/adler32.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/adler32.h')
-rw-r--r--libavutil/adler32.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/libavutil/adler32.h b/libavutil/adler32.h
index a1f035b734..e7a8f83729 100644
--- a/libavutil/adler32.h
+++ b/libavutil/adler32.h
@@ -27,8 +27,10 @@
#ifndef AVUTIL_ADLER32_H
#define AVUTIL_ADLER32_H
+#include <stddef.h>
#include <stdint.h>
#include "attributes.h"
+#include "version.h"
/**
* @defgroup lavu_adler32 Adler-32
@@ -38,6 +40,12 @@
* @{
*/
+#if FF_API_CRYPTO_SIZE_T
+typedef unsigned long AVAdler;
+#else
+typedef uint32_t AVAdler;
+#endif
+
/**
* Calculate the Adler32 checksum of a buffer.
*
@@ -50,8 +58,12 @@
* @param len size of input buffer
* @return updated checksum
*/
-unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,
- unsigned int len) av_pure;
+AVAdler av_adler32_update(AVAdler adler, const uint8_t *buf,
+#if FF_API_CRYPTO_SIZE_T
+ unsigned int len) av_pure;
+#else
+ size_t len) av_pure;
+#endif
/**
* @}