diff options
author | Diego Biurrun <diego@biurrun.de> | 2015-12-11 17:29:11 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2016-10-28 13:24:44 +0200 |
commit | c454dfcff90f0ed39c7b0d4e85664986a8b4476c (patch) | |
tree | 61f67f2888778ee7a2d5ef9ffeb1838b50f8e9a5 /libavcodec | |
parent | fbe425c8d29e473a8f69ae2dc52b1a10b77f3b44 (diff) |
Use ISO C printf conversion specifiers where appropriate
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/bitstream.c | 2 | ||||
-rw-r--r-- | libavcodec/dnxhddec.c | 10 | ||||
-rw-r--r-- | libavcodec/dvdec.c | 2 | ||||
-rw-r--r-- | libavcodec/dvdsubdec.c | 9 | ||||
-rw-r--r-- | libavcodec/dxv.c | 3 |
5 files changed, 14 insertions, 12 deletions
diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index 656ac47d96..c7eba2913f 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -182,7 +182,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes, n = codes[i].bits; code = codes[i].code; symbol = codes[i].symbol; - ff_dlog(NULL, "i=%d n=%d code=0x%x\n", i, n, code); + ff_dlog(NULL, "i=%d n=%d code=0x%"PRIx32"\n", i, n, code); if (n <= table_nb_bits) { /* no need to add another table */ j = code >> (32 - table_nb_bits); diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index 052f3d0c2b..75247eaff4 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -122,7 +122,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, if (memcmp(buf, header_prefix, 5) && memcmp(buf, header_prefix444, 5)) { av_log(ctx->avctx, AV_LOG_ERROR, - "unknown header 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X\n", + "unknown header 0x%02"PRIX8" 0x%02"PRIX8" 0x%02"PRIX8" 0x%02"PRIX8" 0x%02"PRIX8"\n", buf[0], buf[1], buf[2], buf[3], buf[4]); return AVERROR_INVALIDDATA; } @@ -131,7 +131,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, frame->interlaced_frame = 1; frame->top_field_first = first_field ^ ctx->cur_field; av_log(ctx->avctx, AV_LOG_DEBUG, - "interlaced %d, cur field %d\n", buf[5] & 3, ctx->cur_field); + "interlaced %"PRId8", cur field %d\n", buf[5] & 3, ctx->cur_field); } ctx->mbaff = buf[0x6] & 32; @@ -157,7 +157,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P; ctx->decode_dct_block = dnxhd_decode_dct_block_8; } else { - av_log(ctx->avctx, AV_LOG_ERROR, "invalid bit depth value (%d).\n", + av_log(ctx->avctx, AV_LOG_ERROR, "invalid bit depth value (%"PRId8").\n", buf[0x21]); return AVERROR_INVALIDDATA; } @@ -208,10 +208,10 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, for (i = 0; i < ctx->mb_height; i++) { ctx->mb_scan_index[i] = AV_RB32(buf + 0x170 + (i << 2)); - ff_dlog(ctx->avctx, "mb scan index %d\n", ctx->mb_scan_index[i]); + ff_dlog(ctx->avctx, "mb scan index %"PRIu32"\n", ctx->mb_scan_index[i]); if (buf_size < ctx->mb_scan_index[i] + 0x280) { av_log(ctx->avctx, AV_LOG_ERROR, - "invalid mb scan index (%d < %d).\n", + "invalid mb scan index (%d < %"PRIu32").\n", buf_size, ctx->mb_scan_index[i] + 0x280); return AVERROR_INVALIDDATA; } diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index 777725d018..dc37a5efdd 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -270,7 +270,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg) } if (mb->pos >= 64 && mb->pos < 127) av_log(avctx, AV_LOG_ERROR, - "AC EOB marker is absent pos=%d\n", mb->pos); + "AC EOB marker is absent pos=%"PRIu8"\n", mb->pos); block += 64; mb++; } diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 6e55a09bc2..86c287391f 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -247,7 +247,8 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, alpha[1] = buf[pos + 1] >> 4; alpha[0] = buf[pos + 1] & 0x0f; pos += 2; - ff_dlog(NULL, "alpha=%x%x%x%x\n", alpha[0],alpha[1],alpha[2],alpha[3]); + ff_dlog(NULL, "alpha=%"PRIx8"%"PRIx8"%"PRIx8"%"PRIx8"\n", + alpha[0], alpha[1], alpha[2], alpha[3]); break; case 0x05: case 0x85: @@ -267,7 +268,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, goto fail; offset1 = AV_RB16(buf + pos); offset2 = AV_RB16(buf + pos + 2); - ff_dlog(NULL, "offset1=0x%04x offset2=0x%04x\n", offset1, offset2); + ff_dlog(NULL, "offset1=0x%04"PRIx64" offset2=0x%04"PRIx64"\n", offset1, offset2); pos += 4; break; case 0x86: @@ -275,7 +276,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, goto fail; offset1 = AV_RB32(buf + pos); offset2 = AV_RB32(buf + pos + 4); - ff_dlog(NULL, "offset1=0x%04x offset2=0x%04x\n", offset1, offset2); + ff_dlog(NULL, "offset1=0x%04"PRIx64" offset2=0x%04"PRIx64"\n", offset1, offset2); pos += 8; break; @@ -515,7 +516,7 @@ static int dvdsub_decode(AVCodecContext *avctx, goto no_subtitle; #if defined(DEBUG) - ff_dlog(NULL, "start=%d ms end =%d ms\n", + ff_dlog(NULL, "start=%"PRIu32" ms end =%"PRIu32" ms\n", sub->start_display_time, sub->end_display_time); ppm_save("/tmp/a.ppm", sub->rects[0]->data[0], diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c index e96ab44e35..9b14ef46ae 100644 --- a/libavcodec/dxv.c +++ b/libavcodec/dxv.c @@ -393,7 +393,8 @@ static int dxv_decode(AVCodecContext *avctx, void *data, ctx->tex_funct = ctx->texdsp.dxt1_block; ctx->tex_step = 8; } else { - av_log(avctx, AV_LOG_ERROR, "Unsupported header (0x%08X)\n.", tag); + av_log(avctx, AV_LOG_ERROR, + "Unsupported header (0x%08"PRIX32")\n.", tag); return AVERROR_INVALIDDATA; } ctx->tex_rat = 1; |