av_adler32_update() is used by av_hash_update() which will be switched to size_t at the next bump. So it also has to be made to use size_t. This is also necessary for framecrcenc.c, because the size of side data will become a size_t, too.
Unified · Split
| @@ -15,6 +15,13 @@ libavutil: 2017-10-21 · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | API changes, most recent first: |
| 17 | 17 | |
| 18 | +2021-03-19 - xxxxxxxxxx - lavu 56.69.100 - adler32.h | |
| 19 | + Added a typedef for the type of the Adler-32 checksums | |
| 20 | + used by av_adler32_update(). It will be changed to uint32_t | |
| 21 | + at the next major bump. | |
| 22 | + The type of the parameter for the length of the input buffer | |
| 23 | + will also be changed to size_t at the next major bump. | |
| 24 | + | |
| 18 | 25 | 2021-03-19 - xxxxxxxxxx - lavf 58.75.100 - avformat.h |
| 19 | 26 | AVChapter.id will be changed from int to int64_t |
| 20 | 27 | on the next major version bump. |
| @@ -41,8 +41,12 @@ · 40 unmodified lines | ||
| 41 | 41 | #define DO4(buf) DO1(buf); DO1(buf); DO1(buf); DO1(buf); |
| 42 | 42 | #define DO16(buf) DO4(buf); DO4(buf); DO4(buf); DO4(buf); |
| 43 | 43 | |
| 44 | +#if FF_API_CRYPTO_SIZE_T | |
| 44 | 45 | unsigned long av_adler32_update(unsigned long adler, const uint8_t * buf, |
| 45 | 46 | unsigned int len) |
| 47 | +#else | |
| 48 | +AVAdler av_adler32_update(AVAdler adler, const uint8_t *buf, size_t len) | |
| 49 | +#endif | |
| 46 | 50 | { |
| 47 | 51 | unsigned long s1 = adler & 0xffff; |
| 48 | 52 | unsigned long s2 = adler >> 16; |
| @@ -27,8 +27,10 @@ · 26 unmodified lines | ||
| 27 | 27 | #ifndef AVUTIL_ADLER32_H |
| 28 | 28 | #define AVUTIL_ADLER32_H |
| 29 | 29 | |
| 30 | +#include <stddef.h> | |
| 30 | 31 | #include <stdint.h> |
| 31 | 32 | #include "attributes.h" |
| 33 | +#include "version.h" | |
| 32 | 34 | |
| 33 | 35 | /** |
| 34 | 36 | * @defgroup lavu_adler32 Adler-32 |
| @@ -38,6 +40,12 @@ · 3 unmodified lines | ||
| 38 | 40 | * @{ |
| 39 | 41 | */ |
| 40 | 42 | |
| 43 | +#if FF_API_CRYPTO_SIZE_T | |
| 44 | +typedef unsigned long AVAdler; | |
| 45 | +#else | |
| 46 | +typedef uint32_t AVAdler; | |
| 47 | +#endif | |
| 48 | + | |
| 41 | 49 | /** |
| 42 | 50 | * Calculate the Adler32 checksum of a buffer. |
| 43 | 51 | * |
| @@ -50,8 +58,12 @@ · 6 unmodified lines | ||
| 50 | 58 | * @param len size of input buffer |
| 51 | 59 | * @return updated checksum |
| 52 | 60 | */ |
| 53 | −unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, | |
| 54 | − unsigned int len) av_pure; | |
| 61 | +AVAdler av_adler32_update(AVAdler adler, const uint8_t *buf, | |
| 62 | +#if FF_API_CRYPTO_SIZE_T | |
| 63 | + unsigned int len) av_pure; | |
| 64 | +#else | |
| 65 | + size_t len) av_pure; | |
| 66 | +#endif | |
| 55 | 67 | |
| 56 | 68 | /** |
| 57 | 69 | * @} |
| @@ -79,7 +79,7 @@ · 78 unmodified lines | ||
| 79 | 79 | */ |
| 80 | 80 | |
| 81 | 81 | #define LIBAVUTIL_VERSION_MAJOR 56 |
| 82 | −#define LIBAVUTIL_VERSION_MINOR 68 | |
| 82 | +#define LIBAVUTIL_VERSION_MINOR 69 | |
| 83 | 83 | #define LIBAVUTIL_VERSION_MICRO 100 |
| 84 | 84 | |
| 85 | 85 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |