More correct printf format specifiers

This avoids compiler warnings about argument and specifier type mismatch.
This commit is contained in:
Diego Biurrun 2014-04-01 18:19:59 +00:00 committed by Vittorio Giovara
parent 80035db88c
commit cba4e6062a
8 changed files with 18 additions and 11 deletions

View File

@ -770,7 +770,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
break;
}
if (chunk_size < 2) {
av_log(avctx, AV_LOG_ERROR, "Invalid tile data size %d\n",
av_log(avctx, AV_LOG_ERROR, "Invalid tile data size %"PRIu32"\n",
chunk_size);
break;
}
@ -821,7 +821,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
case CHUNK_CD:
break;
default:
av_log(avctx, AV_LOG_WARNING, "Skipping chunk type %02"PRIX32"\n",
av_log(avctx, AV_LOG_WARNING, "Skipping chunk type %02d\n",
chunk_type);
}

View File

@ -495,7 +495,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h)
if (h->avctx->debug & FF_DEBUG_PICT_INFO) {
static const char csp[4][5] = { "Gray", "420", "422", "444" };
av_log(h->avctx, AV_LOG_DEBUG,
"sps:%u profile:%d/%d poc:%d ref:%d %dx%d %s %s crop:%u/%u/%u/%u %s %s %d/%d\n",
"sps:%u profile:%d/%d poc:%d ref:%d %dx%d %s %s crop:%u/%u/%u/%u %s %s %"PRId32"/%"PRId32"\n",
sps_id, sps->profile_idc, sps->level_idc,
sps->poc_type,
sps->ref_frame_count,

View File

@ -25,6 +25,8 @@
* @author Michael Niedermayer <michaelni@gmx.at>
*/
#include <inttypes.h>
#include "internal.h"
#include "avcodec.h"
#include "h264.h"
@ -497,7 +499,7 @@ static void print_short_term(H264Context *h)
av_log(h->avctx, AV_LOG_DEBUG, "short term list:\n");
for (i = 0; i < h->short_ref_count; i++) {
H264Picture *pic = h->short_ref[i];
av_log(h->avctx, AV_LOG_DEBUG, "%d fn:%d poc:%d %p\n",
av_log(h->avctx, AV_LOG_DEBUG, "%"PRIu32" fn:%d poc:%d %p\n",
i, pic->frame_num, pic->poc, pic->f.data[0]);
}
}
@ -514,7 +516,7 @@ static void print_long_term(H264Context *h)
for (i = 0; i < 16; i++) {
H264Picture *pic = h->long_ref[i];
if (pic) {
av_log(h->avctx, AV_LOG_DEBUG, "%d fn:%d poc:%d %p\n",
av_log(h->avctx, AV_LOG_DEBUG, "%"PRIu32" fn:%d poc:%d %p\n",
i, pic->frame_num, pic->poc, pic->f.data[0]);
}
}

View File

@ -487,7 +487,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_DEBUG, "Encoder version %d.%d.%d.%d\n",
avctx->extradata[3], avctx->extradata[2],
avctx->extradata[1], avctx->extradata[0]);
av_log(avctx, AV_LOG_DEBUG, "Original format %X\n",
av_log(avctx, AV_LOG_DEBUG, "Original format %"PRIX32"\n",
AV_RB32(avctx->extradata + 4));
c->frame_info_size = AV_RL32(avctx->extradata + 8);
c->flags = AV_RL32(avctx->extradata + 12);

View File

@ -239,7 +239,7 @@ typedef struct WMAProDecodeCtx {
static av_cold void dump_context(WMAProDecodeCtx *s)
{
#define PRINT(a, b) av_log(s->avctx, AV_LOG_DEBUG, " %s = %d\n", a, b);
#define PRINT_HEX(a, b) av_log(s->avctx, AV_LOG_DEBUG, " %s = %x\n", a, b);
#define PRINT_HEX(a, b) av_log(s->avctx, AV_LOG_DEBUG, " %s = %"PRIx32"\n", a, b);
PRINT("ed sample bit depth", s->bits_per_sample);
PRINT_HEX("ed decode flags", s->decode_flags);

View File

@ -83,7 +83,9 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
av_log(avctx, AV_LOG_DEBUG,
"vclass %"PRIu32", ncolors %"PRIu32", bpp %"PRIu32", be %"PRIu32", lsize %"PRIu32", xoffset %"PRIu32"\n",
vclass, ncolors, bpp, be, lsize, xoffset);
av_log(avctx, AV_LOG_DEBUG, "red %0x, green %0x, blue %0x\n", rgb[0], rgb[1], rgb[2]);
av_log(avctx, AV_LOG_DEBUG,
"red %0"PRIx32", green %0"PRIx32", blue %0"PRIx32"\n",
rgb[0], rgb[1], rgb[2]);
if (pixformat > XWD_Z_PIXMAP) {
av_log(avctx, AV_LOG_ERROR, "invalid pixmap format\n");

View File

@ -1343,7 +1343,7 @@ static int mov_rewrite_dvd_sub_extradata(AVStream *st)
uint32_t yuv = AV_RB32(src + i * 4);
uint32_t rgba = yuv_to_rgba(yuv);
av_strlcatf(buf, sizeof(buf), "%06x%s", rgba, i != 15 ? ", " : "");
av_strlcatf(buf, sizeof(buf), "%06"PRIx32"%s", rgba, i != 15 ? ", " : "");
}
if (av_strlcat(buf, "\n", sizeof(buf)) >= sizeof(buf))

View File

@ -22,6 +22,7 @@
*/
#include <stdint.h>
#include <inttypes.h>
#include "movenc.h"
#include "avformat.h"
@ -3216,8 +3217,10 @@ static int mov_create_dvd_sub_decoder_specific_info(MOVTrack *track,
if (strncmp("palette:", cur, 8) == 0) {
int i, count;
count = sscanf(cur + 8,
"%06x, %06x, %06x, %06x, %06x, %06x, %06x, %06x, "
"%06x, %06x, %06x, %06x, %06x, %06x, %06x, %06x",
"%06"PRIx32", %06"PRIx32", %06"PRIx32", %06"PRIx32", "
"%06"PRIx32", %06"PRIx32", %06"PRIx32", %06"PRIx32", "
"%06"PRIx32", %06"PRIx32", %06"PRIx32", %06"PRIx32", "
"%06"PRIx32", %06"PRIx32", %06"PRIx32", %06"PRIx32"",
&palette[ 0], &palette[ 1], &palette[ 2], &palette[ 3],
&palette[ 4], &palette[ 5], &palette[ 6], &palette[ 7],
&palette[ 8], &palette[ 9], &palette[10], &palette[11],