Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-14 15:59:32 +0300
committerJames Almer <jamrial@gmail.com>2021-04-27 16:43:13 +0300
commitef6a9e5e311f09fa8032974fa4d0c1e166a959bb (patch)
treeb9b1893c45771cde9f36853685a5bc8a6b5cf27c /libavformat/hashenc.c
parent985c0dac674846721ec8ff23344c16ac7d1c9a1e (diff)
avutil/buffer: Switch AVBuffer API to size_t
Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/hashenc.c')
-rw-r--r--libavformat/hashenc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/hashenc.c b/libavformat/hashenc.c
index 1e9faf372a..ec4e44ef12 100644
--- a/libavformat/hashenc.c
+++ b/libavformat/hashenc.c
@@ -298,18 +298,19 @@ static int framehash_write_packet(struct AVFormatContext *s, AVPacket *pkt)
avio_write(s->pb, buf, strlen(buf));
if (c->format_version > 1 && pkt->side_data_elems) {
- int i, j;
+ int i;
avio_printf(s->pb, ", S=%d", pkt->side_data_elems);
for (i = 0; i < pkt->side_data_elems; i++) {
av_hash_init(c->hashes[0]);
if (HAVE_BIGENDIAN && pkt->side_data[i].type == AV_PKT_DATA_PALETTE) {
- for (j = 0; j < pkt->side_data[i].size; j += sizeof(uint32_t)) {
+ for (size_t j = 0; j < pkt->side_data[i].size; j += sizeof(uint32_t)) {
uint32_t data = AV_RL32(pkt->side_data[i].data + j);
av_hash_update(c->hashes[0], (uint8_t *)&data, sizeof(uint32_t));
}
} else
av_hash_update(c->hashes[0], pkt->side_data[i].data, pkt->side_data[i].size);
- snprintf(buf, sizeof(buf) - (AV_HASH_MAX_SIZE * 2 + 1), ", %8d, ", pkt->side_data[i].size);
+ snprintf(buf, sizeof(buf) - (AV_HASH_MAX_SIZE * 2 + 1),
+ ", %8"SIZE_SPECIFIER", ", pkt->side_data[i].size);
len = strlen(buf);
av_hash_final_hex(c->hashes[0], buf + len, sizeof(buf) - len);
avio_write(s->pb, buf, strlen(buf));