History

avutil/adler32: Switch av_adler32_update() to size_t on bump

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.

Andreas Rheinhardt committed 5 years ago

Commit e8c0bca1 parent a46d7814 files · +26 −3Browse files

Unified · Split

4 files
  1. doc/APIchanges +7 −0
  2. libavutil/adler32.c +4 −0
  3. libavutil/adler32.h +14 −2
  4. libavutil/version.h +1 −1
doc/APIchanges+7−0
@@ -15,6 +15,13 @@ libavutil: 2017-10-21 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182021-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
182021-03-19 - xxxxxxxxxx - lavf 58.75.100 - avformat.h252021-03-19 - xxxxxxxxxx - lavf 58.75.100 - avformat.h
19 AVChapter.id will be changed from int to int64_t26 AVChapter.id will be changed from int to int64_t
20 on the next major version bump.27 on the next major version bump.
libavutil/adler32.c+4−0
@@ -41,8 +41,12 @@ · 40 unmodified lines
41#define DO4(buf) DO1(buf); DO1(buf); DO1(buf); DO1(buf);41#define DO4(buf) DO1(buf); DO1(buf); DO1(buf); DO1(buf);
42#define DO16(buf) DO4(buf); DO4(buf); DO4(buf); DO4(buf);42#define DO16(buf) DO4(buf); DO4(buf); DO4(buf); DO4(buf);
43 43
44#if FF_API_CRYPTO_SIZE_T
44unsigned long av_adler32_update(unsigned long adler, const uint8_t * buf,45unsigned long av_adler32_update(unsigned long adler, const uint8_t * buf,
45 unsigned int len)46 unsigned int len)
47#else
48AVAdler av_adler32_update(AVAdler adler, const uint8_t *buf, size_t len)
49#endif
46{50{
47 unsigned long s1 = adler & 0xffff;51 unsigned long s1 = adler & 0xffff;
48 unsigned long s2 = adler >> 16;52 unsigned long s2 = adler >> 16;
libavutil/adler32.h+14−2
@@ -27,8 +27,10 @@ · 26 unmodified lines
27#ifndef AVUTIL_ADLER32_H27#ifndef AVUTIL_ADLER32_H
28#define AVUTIL_ADLER32_H28#define AVUTIL_ADLER32_H
29 29
30#include <stddef.h>
30#include <stdint.h>31#include <stdint.h>
31#include "attributes.h"32#include "attributes.h"
33#include "version.h"
32 34
33/**35/**
34 * @defgroup lavu_adler32 Adler-3236 * @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
44typedef unsigned long AVAdler;
45#else
46typedef uint32_t AVAdler;
47#endif
48
41/**49/**
42 * Calculate the Adler32 checksum of a buffer.50 * Calculate the Adler32 checksum of a buffer.
43 *51 *
@@ -50,8 +58,12 @@ · 6 unmodified lines
50 * @param len size of input buffer58 * @param len size of input buffer
51 * @return updated checksum59 * @return updated checksum
52 */60 */
53unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,61AVAdler av_adler32_update(AVAdler adler, const uint8_t *buf,
54 unsigned int len) av_pure;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 * @}
libavutil/version.h+1−1
@@ -79,7 +79,7 @@ · 78 unmodified lines
79 */79 */
80 80
81#define LIBAVUTIL_VERSION_MAJOR 5681#define LIBAVUTIL_VERSION_MAJOR 56
82#define LIBAVUTIL_VERSION_MINOR 6882#define LIBAVUTIL_VERSION_MINOR 69
83#define LIBAVUTIL_VERSION_MICRO 10083#define LIBAVUTIL_VERSION_MICRO 100
84 84
85#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \85#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t