summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-03-24 13:29:45 +0100
committerClément Bœsch <u@pkh.me>2017-03-24 13:34:39 +0100
commit46f4f8ad865d4e4d867d14edb44a656318951ec1 (patch)
tree0e85a99befbcfc982b98ebc3ac994fbbdd470ec0 /libavformat
parent1436769c57cc6e5209609073e5fd60776a293669 (diff)
parent1263b2039eb5aaf1522e9de9f07c787ab30a5f50 (diff)
Merge commit '1263b2039eb5aaf1522e9de9f07c787ab30a5f50'
* commit '1263b2039eb5aaf1522e9de9f07c787ab30a5f50': Adjust printf conversion specifiers to match variable signedness Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c38
-rw-r--r--libavformat/rtpdec_jpeg.c2
-rw-r--r--libavformat/rtpdec_xiph.c4
-rw-r--r--libavformat/rtpenc.c2
4 files changed, 23 insertions, 23 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index dbe94e2368..41bf21d8c3 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2407,7 +2407,7 @@ static int mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
entries = avio_rb32(pb);
- av_log(c->fc, AV_LOG_TRACE, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries);
+ av_log(c->fc, AV_LOG_TRACE, "track[%u].stsc.entries = %u\n", c->fc->nb_streams - 1, entries);
if (!entries)
return 0;
@@ -2498,7 +2498,7 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom)
entries = avio_rb32(pb);
- av_log(c->fc, AV_LOG_TRACE, "keyframe_count = %d\n", entries);
+ av_log(c->fc, AV_LOG_TRACE, "keyframe_count = %u\n", entries);
if (!entries)
{
@@ -2559,14 +2559,14 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
entries = avio_rb32(pb);
- av_log(c->fc, AV_LOG_TRACE, "sample_size = %d sample_count = %d\n", sc->sample_size, entries);
+ av_log(c->fc, AV_LOG_TRACE, "sample_size = %u sample_count = %u\n", sc->sample_size, entries);
sc->sample_count = entries;
if (sample_size)
return 0;
if (field_size != 4 && field_size != 8 && field_size != 16 && field_size != 32) {
- av_log(c->fc, AV_LOG_ERROR, "Invalid sample field size %d\n", field_size);
+ av_log(c->fc, AV_LOG_ERROR, "Invalid sample field size %u\n", field_size);
return AVERROR_INVALIDDATA;
}
@@ -2631,7 +2631,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb24(pb); /* flags */
entries = avio_rb32(pb);
- av_log(c->fc, AV_LOG_TRACE, "track[%i].stts.entries = %i\n",
+ av_log(c->fc, AV_LOG_TRACE, "track[%u].stts.entries = %u\n",
c->fc->nb_streams-1, entries);
if (sc->stts_data)
@@ -2710,7 +2710,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb24(pb); /* flags */
entries = avio_rb32(pb);
- av_log(c->fc, AV_LOG_TRACE, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries);
+ av_log(c->fc, AV_LOG_TRACE, "track[%u].ctts.entries = %u\n", c->fc->nb_streams - 1, entries);
if (!entries)
return 0;
@@ -3425,8 +3425,8 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
e->size = sample_size;
e->min_distance = distance;
e->flags = keyframe ? AVINDEX_KEYFRAME : 0;
- av_log(mov->fc, AV_LOG_TRACE, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
- "size %d, distance %d, keyframe %d\n", st->index, current_sample,
+ av_log(mov->fc, AV_LOG_TRACE, "AVIndex stream %d, sample %u, offset %"PRIx64", dts %"PRId64", "
+ "size %u, distance %u, keyframe %d\n", st->index, current_sample,
current_offset, current_dts, sample_size, distance, keyframe);
if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && st->nb_index_entries < 100)
ff_rfps_add_frame(mov->fc, st, current_dts);
@@ -3496,7 +3496,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
total += chunk_count * count;
}
- av_log(mov->fc, AV_LOG_TRACE, "chunk count %d\n", total);
+ av_log(mov->fc, AV_LOG_TRACE, "chunk count %u\n", total);
if (total >= UINT_MAX / sizeof(*st->index_entries) - st->nb_index_entries)
return;
if (av_reallocp_array(&st->index_entries,
@@ -3541,7 +3541,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
}
if (st->nb_index_entries >= total) {
- av_log(mov->fc, AV_LOG_ERROR, "wrong chunk count %d\n", total);
+ av_log(mov->fc, AV_LOG_ERROR, "wrong chunk count %u\n", total);
return;
}
if (size > 0x3FFFFFFF) {
@@ -3554,9 +3554,9 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
e->size = size;
e->min_distance = 0;
e->flags = AVINDEX_KEYFRAME;
- av_log(mov->fc, AV_LOG_TRACE, "AVIndex stream %d, chunk %d, offset %"PRIx64", dts %"PRId64", "
- "size %d, duration %d\n", st->index, i, current_offset, current_dts,
- size, samples);
+ av_log(mov->fc, AV_LOG_TRACE, "AVIndex stream %d, chunk %u, offset %"PRIx64", dts %"PRId64", "
+ "size %u, duration %u\n", st->index, i, current_offset, current_dts,
+ size, samples);
current_offset += size;
current_dts += samples;
@@ -4183,7 +4183,7 @@ static int mov_read_tfdt(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
}
if (!st) {
- av_log(c->fc, AV_LOG_ERROR, "could not find corresponding track id %d\n", frag->track_id);
+ av_log(c->fc, AV_LOG_ERROR, "could not find corresponding track id %u\n", frag->track_id);
return AVERROR_INVALIDDATA;
}
sc = st->priv_data;
@@ -4218,7 +4218,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
}
if (!st) {
- av_log(c->fc, AV_LOG_ERROR, "could not find corresponding track id %d\n", frag->track_id);
+ av_log(c->fc, AV_LOG_ERROR, "could not find corresponding track id %u\n", frag->track_id);
return AVERROR_INVALIDDATA;
}
sc = st->priv_data;
@@ -4227,7 +4227,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_r8(pb); /* version */
flags = avio_rb24(pb);
entries = avio_rb32(pb);
- av_log(c->fc, AV_LOG_TRACE, "flags 0x%x entries %d\n", flags, entries);
+ av_log(c->fc, AV_LOG_TRACE, "flags 0x%x entries %u\n", flags, entries);
/* Always assume the presence of composition time offsets.
* Without this assumption, for instance, we cannot deal with a track in fragmented movies that meet the following.
@@ -4307,8 +4307,8 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (err < 0) {
av_log(c->fc, AV_LOG_ERROR, "Failed to add index entry\n");
}
- av_log(c->fc, AV_LOG_TRACE, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
- "size %d, distance %d, keyframe %d\n", st->index, sc->sample_count+i,
+ av_log(c->fc, AV_LOG_TRACE, "AVIndex stream %d, sample %u, offset %"PRIx64", dts %"PRId64", "
+ "size %u, distance %d, keyframe %d\n", st->index, sc->sample_count+i,
offset, dts, sample_size, distance, keyframe);
distance++;
dts += sample_duration;
@@ -4547,7 +4547,7 @@ static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (!sc->elst_data)
return AVERROR(ENOMEM);
- av_log(c->fc, AV_LOG_TRACE, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, edit_count);
+ av_log(c->fc, AV_LOG_TRACE, "track[%u].edit_count = %i\n", c->fc->nb_streams - 1, edit_count);
for (i = 0; i < edit_count && !pb->eof_reached; i++) {
MOVElst *e = &sc->elst_data[i];
diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index 397b5cf56c..05dd17205c 100644
--- a/libavformat/rtpdec_jpeg.c
+++ b/libavformat/rtpdec_jpeg.c
@@ -247,7 +247,7 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg,
type &= ~0x40;
}
if (type > 1) {
- av_log(ctx, AV_LOG_ERROR, "Unimplemented RTP/JPEG type %d\n", type);
+ av_log(ctx, AV_LOG_ERROR, "Unimplemented RTP/JPEG type %"PRIu8"\n", type);
return AVERROR_PATCHWELCOME;
}
diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c
index 26aef54e1d..e1b79903f6 100644
--- a/libavformat/rtpdec_xiph.c
+++ b/libavformat/rtpdec_xiph.c
@@ -247,7 +247,7 @@ parse_packed_headers(AVFormatContext *s,
if (num_packed != 1 || num_headers > 3) {
av_log(s, AV_LOG_ERROR,
- "Unimplemented number of headers: %d packed headers, %d headers\n",
+ "Unimplemented number of headers: %u packed headers, %u headers\n",
num_packed, num_headers);
return AVERROR_PATCHWELCOME;
}
@@ -255,7 +255,7 @@ parse_packed_headers(AVFormatContext *s,
if (packed_headers_end - packed_headers != length ||
length1 > length || length2 > length - length1) {
av_log(s, AV_LOG_ERROR,
- "Bad packed header lengths (%d,%d,%"PTRDIFF_SPECIFIER",%d)\n", length1,
+ "Bad packed header lengths (%d,%d,%"PTRDIFF_SPECIFIER",%u)\n", length1,
length2, packed_headers_end - packed_headers, length);
return AVERROR_INVALIDDATA;
}
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index efa63a5575..eee17d07a6 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -145,7 +145,7 @@ static int rtp_write_header(AVFormatContext *s1)
} else
s1->packet_size = s1->pb->max_packet_size;
if (s1->packet_size <= 12) {
- av_log(s1, AV_LOG_ERROR, "Max packet size %d too low\n", s1->packet_size);
+ av_log(s1, AV_LOG_ERROR, "Max packet size %u too low\n", s1->packet_size);
return AVERROR(EIO);
}
s->buf = av_malloc(s1->packet_size);