From 549045254c4614d5d61b5c36e340171a6914d57c Mon Sep 17 00:00:00 2001 From: Clément Bœsch Date: Mon, 27 Mar 2017 21:31:46 +0200 Subject: Fix all -Wformat warnings raised by DJGPP --- libavformat/aadec.c | 3 ++- libavformat/apngdec.c | 2 +- libavformat/astdec.c | 2 +- libavformat/brstm.c | 2 +- libavformat/dashenc.c | 2 +- libavformat/dump.c | 3 ++- libavformat/framecrcenc.c | 2 +- libavformat/ircamdec.c | 2 +- libavformat/mov.c | 23 ++++++++++++----------- libavformat/mov_chan.c | 5 +++-- libavformat/movenc.c | 6 +++--- libavformat/mp3enc.c | 2 +- libavformat/mpegtsenc.c | 10 ++++++---- libavformat/mux.c | 5 ++--- libavformat/nistspheredec.c | 8 ++++---- libavformat/nsvdec.c | 4 ++-- libavformat/omaenc.c | 4 ++-- libavformat/rmdec.c | 3 ++- libavformat/rpl.c | 8 ++++---- libavformat/rtpenc.c | 2 +- libavformat/srtdec.c | 2 +- libavformat/uncodedframecrcenc.c | 2 +- libavformat/westwood_vqa.c | 3 ++- libavformat/xwma.c | 5 +++-- 24 files changed, 59 insertions(+), 51 deletions(-) (limited to 'libavformat') diff --git a/libavformat/aadec.c b/libavformat/aadec.c index 39dea40b80..8d39b1d9ba 100644 --- a/libavformat/aadec.c +++ b/libavformat/aadec.c @@ -112,7 +112,8 @@ static int aa_read_header(AVFormatContext *s) header_seed = atoi(val); } else if (!strcmp(key, "HeaderKey")) { // this looks like "1234567890 1234567890 1234567890 1234567890" av_log(s, AV_LOG_DEBUG, "HeaderKey is <%s>\n", val); - sscanf(val, "%u%u%u%u", &header_key_part[0], &header_key_part[1], &header_key_part[2], &header_key_part[3]); + sscanf(val, "%"SCNu32"%"SCNu32"%"SCNu32"%"SCNu32, + &header_key_part[0], &header_key_part[1], &header_key_part[2], &header_key_part[3]); for (idx = 0; idx < 4; idx++) { AV_WB32(&header_key[idx * 4], header_key_part[idx]); // convert each part to BE! } diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c index e1ea29b713..ffff03710a 100644 --- a/libavformat/apngdec.c +++ b/libavformat/apngdec.c @@ -404,7 +404,7 @@ static int apng_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; return 0; default: - avpriv_request_sample(s, "In-stream tag=%s (0x%08X) len=%"PRIu32, + avpriv_request_sample(s, "In-stream tag=%s (0x%08"PRIX32") len=%"PRIu32, av_fourcc2str(tag), tag, len); avio_skip(pb, len + 4); } diff --git a/libavformat/astdec.c b/libavformat/astdec.c index 7a53d0bb70..4ba08c2180 100644 --- a/libavformat/astdec.c +++ b/libavformat/astdec.c @@ -102,7 +102,7 @@ static int ast_read_packet(AVFormatContext *s, AVPacket *pkt) pkt->stream_index = 0; pkt->pos = pos; } else { - av_log(s, AV_LOG_ERROR, "unknown chunk %x\n", type); + av_log(s, AV_LOG_ERROR, "unknown chunk %"PRIx32"\n", type); avio_skip(s->pb, size); ret = AVERROR_INVALIDDATA; } diff --git a/libavformat/brstm.c b/libavformat/brstm.c index 2e1cada158..87690e3f73 100644 --- a/libavformat/brstm.c +++ b/libavformat/brstm.c @@ -230,7 +230,7 @@ static int read_header(AVFormatContext *s) b->current_block = 0; b->block_count = read32(s); if (b->block_count > UINT16_MAX) { - av_log(s, AV_LOG_WARNING, "too many blocks: %u\n", b->block_count); + av_log(s, AV_LOG_WARNING, "too many blocks: %"PRIu32"\n", b->block_count); return AVERROR_INVALIDDATA; } diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 1f31968ab9..6232c70da2 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -134,7 +134,7 @@ static void set_codec_str(AVFormatContext *s, AVCodecParameters *par, tags[0] = ff_mp4_obj_type; oti = av_codec_get_tag(tags, par->codec_id); if (oti) - av_strlcatf(str, size, ".%02x", oti); + av_strlcatf(str, size, ".%02"PRIx32, oti); else return; diff --git a/libavformat/dump.c b/libavformat/dump.c index 3e6218303d..7c811ce5d2 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -421,7 +421,8 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent) dump_audioservicetype(ctx, &sd); break; case AV_PKT_DATA_QUALITY_STATS: - av_log(ctx, AV_LOG_INFO, "quality factor: %d, pict_type: %c", AV_RL32(sd.data), av_get_picture_type_char(sd.data[4])); + av_log(ctx, AV_LOG_INFO, "quality factor: %"PRId32", pict_type: %c", + AV_RL32(sd.data), av_get_picture_type_char(sd.data[4])); break; case AV_PKT_DATA_CPB_PROPERTIES: av_log(ctx, AV_LOG_INFO, "cpb: "); diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c index 91bcdcd99e..a567b5299c 100644 --- a/libavformat/framecrcenc.c +++ b/libavformat/framecrcenc.c @@ -68,7 +68,7 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt) pkt->side_data[i].data, pkt->side_data[i].size); } - av_strlcatf(buf, sizeof(buf), ", %8d, 0x%08x", pkt->side_data[i].size, side_data_crc); + av_strlcatf(buf, sizeof(buf), ", %8d, 0x%08"PRIx32, pkt->side_data[i].size, side_data_crc); } } av_strlcatf(buf, sizeof(buf), "\n"); diff --git a/libavformat/ircamdec.c b/libavformat/ircamdec.c index a6b7a280f3..d376ffef63 100644 --- a/libavformat/ircamdec.c +++ b/libavformat/ircamdec.c @@ -94,7 +94,7 @@ static int ircam_read_header(AVFormatContext *s) st->codecpar->codec_id = ff_codec_get_id(tags, tag); if (st->codecpar->codec_id == AV_CODEC_ID_NONE) { - av_log(s, AV_LOG_ERROR, "unknown tag %X\n", tag); + av_log(s, AV_LOG_ERROR, "unknown tag %"PRIx32"\n", tag); return AVERROR_INVALIDDATA; } diff --git a/libavformat/mov.c b/libavformat/mov.c index 14b85d0d25..127aec1d1d 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -412,7 +412,7 @@ retry: key = c->meta_keys[index]; } else { av_log(c->fc, AV_LOG_WARNING, - "The index of 'data' is out of range: %d < 1 or >= %d.\n", + "The index of 'data' is out of range: %"PRId32" < 1 or >= %d.\n", index, c->meta_keys_count); } } @@ -686,7 +686,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom) avio_skip(pb, len); } } else { - av_log(c->fc, AV_LOG_DEBUG, "Unknown dref type 0x%08x size %d\n", + av_log(c->fc, AV_LOG_DEBUG, "Unknown dref type 0x%08"PRIx32" size %"PRIu32"\n", dref->type, size); entries--; i--; @@ -700,7 +700,7 @@ static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; uint32_t type; - uint32_t av_unused ctype; + uint32_t ctype; int64_t title_size; char *title_str; int ret; @@ -712,8 +712,8 @@ static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom) ctype = avio_rl32(pb); type = avio_rl32(pb); /* component subtype */ - av_log(c->fc, AV_LOG_TRACE, "ctype= %.4s (0x%08x)\n", (char*)&ctype, ctype); - av_log(c->fc, AV_LOG_TRACE, "stype= %.4s\n", (char*)&type); + av_log(c->fc, AV_LOG_TRACE, "ctype=%s\n", av_fourcc2str(ctype)); + av_log(c->fc, AV_LOG_TRACE, "stype=%s\n", av_fourcc2str(type)); if (c->trak_index < 0) { // meta not inside a trak if (type == MKTAG('m','d','t','a')) { @@ -2284,8 +2284,8 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) id = mov_codec_id(st, format); av_log(c->fc, AV_LOG_TRACE, - "size=%"PRId64" 4CC=%s/0x%08x codec_type=%d\n", size, - av_fourcc2str(format), format, st->codecpar->codec_type); + "size=%"PRId64" 4CC=%s codec_type=%d\n", size, + av_fourcc2str(format), st->codecpar->codec_type); if (st->codecpar->codec_type==AVMEDIA_TYPE_VIDEO) { st->codecpar->codec_id = id; @@ -3816,7 +3816,7 @@ static int mov_read_keys(MOVContext *c, AVIOContext *pb, MOVAtom atom) count = avio_rb32(pb); if (count > UINT_MAX / sizeof(*c->meta_keys) - 1) { av_log(c->fc, AV_LOG_ERROR, - "The 'keys' atom with the invalid key count: %d\n", count); + "The 'keys' atom with the invalid key count: %"PRIu32"\n", count); return AVERROR_INVALIDDATA; } @@ -3830,7 +3830,8 @@ static int mov_read_keys(MOVContext *c, AVIOContext *pb, MOVAtom atom) uint32_t type = avio_rl32(pb); if (key_size < 8) { av_log(c->fc, AV_LOG_ERROR, - "The key# %d in meta has invalid size: %d\n", i, key_size); + "The key# %"PRIu32" in meta has invalid size:" + "%"PRIu32"\n", i, key_size); return AVERROR_INVALIDDATA; } key_size -= 8; @@ -5379,8 +5380,8 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) total_size += 8; } } - av_log(c->fc, AV_LOG_TRACE, "type: %08x '%.4s' parent:'%.4s' sz: %"PRId64" %"PRId64" %"PRId64"\n", - a.type, (char*)&a.type, (char*)&atom.type, a.size, total_size, atom.size); + av_log(c->fc, AV_LOG_TRACE, "type:'%s' parent:'%s' sz: %"PRId64" %"PRId64" %"PRId64"\n", + av_fourcc2str(a.type), av_fourcc2str(atom.type), a.size, total_size, atom.size); if (a.size == 0) { a.size = atom.size - total_size + 8; } diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c index dc8bf8dccc..324dd5f913 100644 --- a/libavformat/mov_chan.c +++ b/libavformat/mov_chan.c @@ -557,8 +557,9 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, bitmap = avio_rb32(pb); num_descr = avio_rb32(pb); - av_log(s, AV_LOG_TRACE, "chan: layout=%u bitmap=%u num_descr=%u\n", - layout_tag, bitmap, num_descr); + av_log(s, AV_LOG_TRACE, "chan: layout=%"PRIu32" " + "bitmap=%"PRIu32" num_descr=%"PRIu32"\n", + layout_tag, bitmap, num_descr); if (size < 12ULL + num_descr * 20ULL) return 0; diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 298d872903..a54aa879e9 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1716,7 +1716,7 @@ static int mov_write_gama_tag(AVIOContext *pb, MOVTrack *track, double gamma) if (gamma > 1e-6) { gama = (uint32_t)lrint((double)(1<<16) * gamma); - av_log(pb, AV_LOG_DEBUG, "writing gama value %d\n", gama); + av_log(pb, AV_LOG_DEBUG, "writing gama value %"PRId32"\n", gama); av_assert0(track->mode == MODE_MOV); avio_wb32(pb, 12); @@ -2378,8 +2378,8 @@ static int mov_write_hdlr_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra descr = "TimeCodeHandler"; } else { av_log(s, AV_LOG_WARNING, - "Unknown hldr_type for %s / 0x%04X, writing dummy values\n", - av_fourcc2str(track->par->codec_tag), track->par->codec_tag); + "Unknown hldr_type for %s, writing dummy values\n", + av_fourcc2str(track->par->codec_tag)); } if (track->st) { // hdlr.name is used by some players to identify the content title diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index 034862261a..3cbf7bd137 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -319,7 +319,7 @@ static int mp3_write_audio_packet(AVFormatContext *s, AVPacket *pkt) if ((mpah.bit_rate == 0) || (mp3->initial_bitrate != mpah.bit_rate)) mp3->has_variable_bitrate = 1; } else { - av_log(s, AV_LOG_WARNING, "Audio packet of size %d (starting with %08X...) " + av_log(s, AV_LOG_WARNING, "Audio packet of size %d (starting with %08"PRIX32"...) " "is invalid, writing it anyway.\n", pkt->size, h); } diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 3250dde311..acea2e93a6 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -1433,7 +1433,8 @@ int ff_check_h264_startcode(AVFormatContext *s, const AVStream *st, const AVPack return AVERROR_INVALIDDATA; } av_log(s, AV_LOG_WARNING, "H.264 bitstream error, startcode missing, size %d", pkt->size); - if (pkt->size) av_log(s, AV_LOG_WARNING, " data %08X", AV_RB32(pkt->data)); + if (pkt->size) + av_log(s, AV_LOG_WARNING, " data %08"PRIX32, AV_RB32(pkt->data)); av_log(s, AV_LOG_WARNING, "\n"); } return 0; @@ -1447,7 +1448,8 @@ static int check_hevc_startcode(AVFormatContext *s, const AVStream *st, const AV return AVERROR_PATCHWELCOME; } av_log(s, AV_LOG_WARNING, "HEVC bitstream error, startcode missing, size %d", pkt->size); - if (pkt->size) av_log(s, AV_LOG_WARNING, " data %08X", AV_RB32(pkt->data)); + if (pkt->size) + av_log(s, AV_LOG_WARNING, " data %08"PRIX32, AV_RB32(pkt->data)); av_log(s, AV_LOG_WARNING, "\n"); } return 0; @@ -1565,7 +1567,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt) do { p = avpriv_find_start_code(p, buf_end, &state); - av_log(s, AV_LOG_TRACE, "nal %d\n", state & 0x1f); + av_log(s, AV_LOG_TRACE, "nal %"PRId32"\n", state & 0x1f); if ((state & 0x1f) == 7) extradd = 0; } while (p < buf_end && (state & 0x1f) != 9 && @@ -1631,7 +1633,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt) do { p = avpriv_find_start_code(p, buf_end, &state); - av_log(s, AV_LOG_TRACE, "nal %d\n", (state & 0x7e)>>1); + av_log(s, AV_LOG_TRACE, "nal %"PRId32"\n", (state & 0x7e)>>1); if ((state & 0x7e) == 2*32) extradd = 0; } while (p < buf_end && (state & 0x7e) != 2*35 && diff --git a/libavformat/mux.c b/libavformat/mux.c index 424b3346c9..e684385b4d 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -372,9 +372,8 @@ FF_ENABLE_DEPRECATION_WARNINGS if (!validate_codec_tag(s, st)) { const uint32_t otag = av_codec_get_tag(s->oformat->codec_tag, par->codec_id); av_log(s, AV_LOG_ERROR, - "Tag %s/0x%08x incompatible with output codec id '%d' (%s)\n", - av_fourcc2str(par->codec_tag), par->codec_tag, - par->codec_id, av_fourcc2str(otag)); + "Tag %s incompatible with output codec id '%d' (%s)\n", + av_fourcc2str(par->codec_tag), par->codec_id, av_fourcc2str(otag)); ret = AVERROR_INVALIDDATA; goto fail; } diff --git a/libavformat/nistspheredec.c b/libavformat/nistspheredec.c index 782d1dfbfb..55f22ebcf4 100644 --- a/libavformat/nistspheredec.c +++ b/libavformat/nistspheredec.c @@ -89,7 +89,7 @@ static int nist_read_header(AVFormatContext *s) return 0; } else if (!memcmp(buffer, "channel_count", 13)) { - sscanf(buffer, "%*s %*s %"SCNd32, &st->codecpar->channels); + sscanf(buffer, "%*s %*s %u", &st->codecpar->channels); } else if (!memcmp(buffer, "sample_byte_format", 18)) { sscanf(buffer, "%*s %*s %31s", format); @@ -108,11 +108,11 @@ static int nist_read_header(AVFormatContext *s) } else if (!memcmp(buffer, "sample_count", 12)) { sscanf(buffer, "%*s %*s %"SCNd64, &st->duration); } else if (!memcmp(buffer, "sample_n_bytes", 14)) { - sscanf(buffer, "%*s %*s %"SCNd32, &bps); + sscanf(buffer, "%*s %*s %d", &bps); } else if (!memcmp(buffer, "sample_rate", 11)) { - sscanf(buffer, "%*s %*s %"SCNd32, &st->codecpar->sample_rate); + sscanf(buffer, "%*s %*s %d", &st->codecpar->sample_rate); } else if (!memcmp(buffer, "sample_sig_bits", 15)) { - sscanf(buffer, "%*s %*s %"SCNd32, &st->codecpar->bits_per_coded_sample); + sscanf(buffer, "%*s %*s %d", &st->codecpar->bits_per_coded_sample); } else { char key[32], value[32]; if (sscanf(buffer, "%31s %*s %31s", key, value) == 2) { diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c index ae179991ce..c6ddb67bbd 100644 --- a/libavformat/nsvdec.c +++ b/libavformat/nsvdec.c @@ -228,7 +228,7 @@ static int nsv_resync(AVFormatContext *s) v <<= 8; v |= avio_r8(pb); if (i < 8) { - av_log(s, AV_LOG_TRACE, "NSV resync: [%d] = %02x\n", i, v & 0x0FF); + av_log(s, AV_LOG_TRACE, "NSV resync: [%d] = %02"PRIx32"\n", i, v & 0x0FF); } if ((v & 0x0000ffff) == 0xefbe) { /* BEEF */ @@ -543,7 +543,7 @@ null_chunk_retry: asize = avio_rl16(pb); vsize = (vsize << 4) | (auxcount >> 4); auxcount &= 0x0f; - av_log(s, AV_LOG_TRACE, "NSV CHUNK %d aux, %u bytes video, %d bytes audio\n", auxcount, vsize, asize); + av_log(s, AV_LOG_TRACE, "NSV CHUNK %d aux, %"PRIu32" bytes video, %d bytes audio\n", auxcount, vsize, asize); /* skip aux stuff */ for (i = 0; i < auxcount; i++) { uint32_t av_unused auxtag; diff --git a/libavformat/omaenc.c b/libavformat/omaenc.c index d89cc37ee0..7952808bf8 100644 --- a/libavformat/omaenc.c +++ b/libavformat/omaenc.c @@ -84,8 +84,8 @@ static av_cold int oma_write_header(AVFormatContext *s) (par->block_align/8 - 1)); break; default: - av_log(s, AV_LOG_ERROR, "unsupported codec tag %d for write\n", - par->codec_tag); + av_log(s, AV_LOG_ERROR, "unsupported codec tag %s for write\n", + av_fourcc2str(par->codec_tag)); return AVERROR(EINVAL); } for (i = 0; i < (EA3_HEADER_SIZE - 36)/4; i++) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 88c2b9abf9..178eaea57d 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -380,7 +380,8 @@ int ff_rm_read_mdpr_codecdata(AVFormatContext *s, AVIOContext *pb, st->codecpar->codec_tag = avio_rl32(pb); st->codecpar->codec_id = ff_codec_get_id(ff_rm_codec_tags, st->codecpar->codec_tag); - av_log(s, AV_LOG_TRACE, "%X %X\n", st->codecpar->codec_tag, MKTAG('R', 'V', '2', '0')); + av_log(s, AV_LOG_TRACE, "%"PRIX32" %X\n", + st->codecpar->codec_tag, MKTAG('R', 'V', '2', '0')); if (st->codecpar->codec_id == AV_CODEC_ID_NONE) goto fail1; st->codecpar->width = avio_rb16(pb); diff --git a/libavformat/rpl.c b/libavformat/rpl.c index a794d3b485..d373600478 100644 --- a/libavformat/rpl.c +++ b/libavformat/rpl.c @@ -170,8 +170,8 @@ static int rpl_read_header(AVFormatContext *s) vst->codecpar->codec_id = AV_CODEC_ID_ESCAPE130; break; default: - avpriv_report_missing_feature(s, "Video format %i", - vst->codecpar->codec_tag); + avpriv_report_missing_feature(s, "Video format %s", + av_fourcc2str(vst->codecpar->codec_tag)); vst->codecpar->codec_id = AV_CODEC_ID_NONE; } @@ -233,8 +233,8 @@ static int rpl_read_header(AVFormatContext *s) rpl->frames_per_chunk = read_line_and_int(pb, &error); // video frames per chunk if (rpl->frames_per_chunk > 1 && vst->codecpar->codec_tag != 124) av_log(s, AV_LOG_WARNING, - "Don't know how to split frames for video format %i. " - "Video stream will be broken!\n", vst->codecpar->codec_tag); + "Don't know how to split frames for video format %s. " + "Video stream will be broken!\n", av_fourcc2str(vst->codecpar->codec_tag)); number_of_chunks = read_line_and_int(pb, &error); // number of chunks in the file // The number in the header is actually the index of the last chunk. diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index eee17d07a6..af631a883a 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -285,7 +285,7 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time, int bye) RTPMuxContext *s = s1->priv_data; uint32_t rtp_ts; - av_log(s1, AV_LOG_TRACE, "RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp); + av_log(s1, AV_LOG_TRACE, "RTCP: %02x %"PRIx64" %"PRIx32"\n", s->payload_type, ntp_time, s->timestamp); s->last_rtcp_ntp_time = ntp_time; rtp_ts = av_rescale_q(ntp_time - s->first_rtcp_ntp_time, (AVRational){1, 1000000}, diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c index 067db63f21..56bd0c43f6 100644 --- a/libavformat/srtdec.c +++ b/libavformat/srtdec.c @@ -78,7 +78,7 @@ static int get_event_info(const char *line, struct event_info *ei) ei->pts = AV_NOPTS_VALUE; ei->pos = -1; if (sscanf(line, "%d:%d:%d%*1[,.]%d --> %d:%d:%d%*1[,.]%d" - "%*[ ]X1:%u X2:%u Y1:%u Y2:%u", + "%*[ ]X1:%"PRId32" X2:%"PRId32" Y1:%"PRId32" Y2:%"PRId32, &hh1, &mm1, &ss1, &ms1, &hh2, &mm2, &ss2, &ms2, &ei->x1, &ei->x2, &ei->y1, &ei->y2) >= 8) { diff --git a/libavformat/uncodedframecrcenc.c b/libavformat/uncodedframecrcenc.c index 5e1a445f4f..ecc42d2869 100644 --- a/libavformat/uncodedframecrcenc.c +++ b/libavformat/uncodedframecrcenc.c @@ -115,7 +115,7 @@ static void audio_frame_cksum(AVBPrint *bp, AVFrame *frame) default: av_assert0(!"reached"); } - av_bprintf(bp, ", 0x%08x", cksum); + av_bprintf(bp, ", 0x%08"PRIx32, cksum); } } diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c index 5a54f130a0..efb9847ff0 100644 --- a/libavformat/westwood_vqa.c +++ b/libavformat/westwood_vqa.c @@ -250,7 +250,8 @@ static int wsvqa_read_packet(AVFormatContext *s, case CMDS_TAG: break; default: - av_log(s, AV_LOG_INFO, "Skipping unknown chunk 0x%08X\n", chunk_type); + av_log(s, AV_LOG_INFO, "Skipping unknown chunk %s\n", + av_fourcc2str(av_bswap32(chunk_type))); } avio_skip(pb, chunk_size + skip_byte); } diff --git a/libavformat/xwma.c b/libavformat/xwma.c index 9235157a77..1c18772928 100644 --- a/libavformat/xwma.c +++ b/libavformat/xwma.c @@ -87,8 +87,9 @@ static int xwma_read_header(AVFormatContext *s) */ if (st->codecpar->codec_id != AV_CODEC_ID_WMAV2 && st->codecpar->codec_id != AV_CODEC_ID_WMAPRO) { - avpriv_request_sample(s, "Unexpected codec (tag 0x%04x; id %d)", - st->codecpar->codec_tag, st->codecpar->codec_id); + avpriv_request_sample(s, "Unexpected codec (tag %s; id %d)", + av_fourcc2str(st->codecpar->codec_tag), + st->codecpar->codec_id); } else { /* In all xWMA files I have seen, there is no extradata. But the WMA * codecs require extradata, so we provide our own fake extradata. -- cgit v1.2.3