diff options
author | James Almer <jamrial@gmail.com> | 2018-02-15 11:12:54 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-02-15 11:21:28 -0300 |
commit | 8a8d0b319a9f941e1fcfda65f3a77c607cb05af2 (patch) | |
tree | 15f22c984566b9bf666c5459eb398dc8d4e8e9c1 | |
parent | 75027066d8e85ccf42b83f6cf1c3085221148f42 (diff) | |
download | ffmpeg-8a8d0b319a9f941e1fcfda65f3a77c607cb05af2.tar.gz |
avutil/crypto: change length parameter to size_t on the remaining modules
See 651ee9346105b9d492e01172ab447c04d03fa32e
fcc4ed1efa1a7575dc45fe57ce552af331941469
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | doc/APIchanges | 4 | ||||
-rw-r--r-- | libavutil/hash.c | 4 | ||||
-rw-r--r-- | libavutil/hash.h | 6 | ||||
-rw-r--r-- | libavutil/murmur3.c | 4 | ||||
-rw-r--r-- | libavutil/murmur3.h | 6 | ||||
-rw-r--r-- | libavutil/ripemd.c | 4 | ||||
-rw-r--r-- | libavutil/ripemd.h | 4 |
7 files changed, 32 insertions, 0 deletions
diff --git a/doc/APIchanges b/doc/APIchanges index 8565cbeb09..a98475366d 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,10 @@ libavutil: 2017-10-21 API changes, most recent first: +2018-02-xx - xxxxxxx + Change av_ripemd_update(), av_murmur3_update() and av_hash_update() length + parameter type to size_t at next major bump. + 2018-02-xx - xxxxxxx - lavfi 7.12.100 - avfilter.h Add AVFilterContext.extra_hw_frames. diff --git a/libavutil/hash.c b/libavutil/hash.c index 7037b0d6ff..75edb6db78 100644 --- a/libavutil/hash.c +++ b/libavutil/hash.c @@ -155,7 +155,11 @@ void av_hash_init(AVHashContext *ctx) } } +#if FF_API_CRYPTO_SIZE_T void av_hash_update(AVHashContext *ctx, const uint8_t *src, int len) +#else +void av_hash_update(AVHashContext *ctx, const uint8_t *src, size_t len) +#endif { switch (ctx->type) { case MD5: av_md5_update(ctx->ctx, src, len); break; diff --git a/libavutil/hash.h b/libavutil/hash.h index a20b8934f1..7693e6bf0d 100644 --- a/libavutil/hash.h +++ b/libavutil/hash.h @@ -29,6 +29,8 @@ #include <stdint.h> +#include "version.h" + /** * @defgroup lavu_hash Hash Functions * @ingroup lavu_crypto @@ -179,7 +181,11 @@ void av_hash_init(struct AVHashContext *ctx); * @param[in] src Data to be added to the hash context * @param[in] len Size of the additional data */ +#if FF_API_CRYPTO_SIZE_T void av_hash_update(struct AVHashContext *ctx, const uint8_t *src, int len); +#else +void av_hash_update(struct AVHashContext *ctx, const uint8_t *src, size_t len); +#endif /** * Finalize a hash context and compute the actual hash value. diff --git a/libavutil/murmur3.c b/libavutil/murmur3.c index ef853f404a..7961752515 100644 --- a/libavutil/murmur3.c +++ b/libavutil/murmur3.c @@ -89,7 +89,11 @@ static inline uint64_t update_h2(uint64_t k, uint64_t h1, uint64_t h2) return k; } +#if FF_API_CRYPTO_SIZE_T void av_murmur3_update(AVMurMur3 *c, const uint8_t *src, int len) +#else +void av_murmur3_update(AVMurMur3 *c, const uint8_t *src, size_t len) +#endif { const uint8_t *end; uint64_t h1 = c->h1, h2 = c->h2; diff --git a/libavutil/murmur3.h b/libavutil/murmur3.h index 6a1694c08d..1b09175c1e 100644 --- a/libavutil/murmur3.h +++ b/libavutil/murmur3.h @@ -29,6 +29,8 @@ #include <stdint.h> +#include "version.h" + /** * @defgroup lavu_murmur3 Murmur3 * @ingroup lavu_hash @@ -97,7 +99,11 @@ void av_murmur3_init(struct AVMurMur3 *c); * @param[in] src Input data to update hash with * @param[in] len Number of bytes to read from `src` */ +#if FF_API_CRYPTO_SIZE_T void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, int len); +#else +void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, size_t len); +#endif /** * Finish hashing and output digest value. diff --git a/libavutil/ripemd.c b/libavutil/ripemd.c index b0db2970db..4f1c4ea899 100644 --- a/libavutil/ripemd.c +++ b/libavutil/ripemd.c @@ -510,7 +510,11 @@ av_cold int av_ripemd_init(AVRIPEMD *ctx, int bits) return 0; } +#if FF_API_CRYPTO_SIZE_T void av_ripemd_update(AVRIPEMD* ctx, const uint8_t* data, unsigned int len) +#else +void av_ripemd_update(AVRIPEMD* ctx, const uint8_t* data, size_t len) +#endif { unsigned int i, j; diff --git a/libavutil/ripemd.h b/libavutil/ripemd.h index 6d6bb3208f..0db6858ff3 100644 --- a/libavutil/ripemd.h +++ b/libavutil/ripemd.h @@ -66,7 +66,11 @@ int av_ripemd_init(struct AVRIPEMD* context, int bits); * @param data input data to update hash with * @param len input data length */ +#if FF_API_CRYPTO_SIZE_T void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, unsigned int len); +#else +void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, size_t len); +#endif /** * Finish hashing and output digest value. |