Commit 8d024c51 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'cc8163e1'

* commit 'cc8163e1':
  avcodec: more correct printf specifiers

Conflicts:
	libavcodec/4xm.c
	libavcodec/alsdec.c
	libavcodec/dfa.c
	libavcodec/h264_ps.c
	libavcodec/jpeg2000dec.c
	libavcodec/lagarith.c
	libavcodec/mpeg12dec.c
	libavcodec/rv10.c
	libavcodec/svq3.c
	libavcodec/wmaprodec.c
	libavcodec/xwddec.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 7ef8d97b cc8163e1
......@@ -24,6 +24,8 @@
* 4XM codec.
*/
#include <inttypes.h>
#include "libavutil/avassert.h"
#include "libavutil/frame.h"
#include "libavutil/imgutils.h"
......@@ -831,7 +833,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
av_assert0(avctx->width % 16 == 0 && avctx->height % 16 == 0);
if (buf_size < AV_RL32(buf + 4) + 8) {
av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d\n",
av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %"PRIu32"\n",
buf_size, AV_RL32(buf + 4));
return AVERROR_INVALIDDATA;
}
......
......@@ -20,6 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include "avcodec.h"
#include "bytestream.h"
#include "dsputil.h"
......@@ -169,7 +171,7 @@ static int aic_decode_header(AICContext *ctx, const uint8_t *src, int size)
width = AV_RB16(src + 6);
height = AV_RB16(src + 8);
if (frame_size > size) {
av_log(ctx->avctx, AV_LOG_ERROR, "Frame size should be %d got %d\n",
av_log(ctx->avctx, AV_LOG_ERROR, "Frame size should be %"PRIu32" got %d\n",
frame_size, size);
return AVERROR_INVALIDDATA;
}
......
......@@ -45,6 +45,8 @@
* 32bit samplerate
*/
#include <inttypes.h>
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "get_bits.h"
......@@ -283,7 +285,7 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index,
else
output_samples = alac->max_samples_per_frame;
if (!output_samples || output_samples > alac->max_samples_per_frame) {
av_log(avctx, AV_LOG_ERROR, "invalid samples per frame: %d\n",
av_log(avctx, AV_LOG_ERROR, "invalid samples per frame: %"PRIu32"\n",
output_samples);
return AVERROR_INVALIDDATA;
}
......@@ -294,7 +296,7 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index,
if ((ret = ff_thread_get_buffer(avctx, &tframe, 0)) < 0)
return ret;
} else if (output_samples != alac->nb_samples) {
av_log(avctx, AV_LOG_ERROR, "sample count mismatch: %u != %d\n",
av_log(avctx, AV_LOG_ERROR, "sample count mismatch: %"PRIu32" != %d\n",
output_samples, alac->nb_samples);
return AVERROR_INVALIDDATA;
}
......@@ -549,7 +551,8 @@ static int alac_set_info(ALACContext *alac)
alac->max_samples_per_frame = bytestream2_get_be32u(&gb);
if (!alac->max_samples_per_frame ||
alac->max_samples_per_frame > INT_MAX / sizeof(int32_t)) {
av_log(alac->avctx, AV_LOG_ERROR, "max samples per frame invalid: %u\n",
av_log(alac->avctx, AV_LOG_ERROR,
"max samples per frame invalid: %"PRIu32"\n",
alac->max_samples_per_frame);
return AVERROR_INVALIDDATA;
}
......
......@@ -25,6 +25,8 @@
* @author Thilo Borgmann <thilo.borgmann _at_ mail.de>
*/
#include <inttypes.h>
#include "avcodec.h"
#include "get_bits.h"
#include "unary.h"
......@@ -722,7 +724,9 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
int offset = parcor_rice_table[sconf->coef_table][k][0];
quant_cof[k] = decode_rice(gb, rice_param) + offset;
if (quant_cof[k] < -64 || quant_cof[k] > 63) {
av_log(avctx, AV_LOG_ERROR, "quant_cof %d is out of range.\n", quant_cof[k]);
av_log(avctx, AV_LOG_ERROR,
"quant_cof %"PRIu32" is out of range.\n",
quant_cof[k]);
return AVERROR_INVALIDDATA;
}
}
......@@ -1397,7 +1401,8 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
bd.block_length = div_blocks[b];
if (bd.block_length <= 0) {
av_log(ctx->avctx, AV_LOG_WARNING,
"Invalid block length %d in channel data!\n", bd.block_length);
"Invalid block length %u in channel data!\n",
bd.block_length);
continue;
}
......
......@@ -20,6 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
......@@ -1469,7 +1471,8 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
}
if (!nblocks || nblocks > INT_MAX) {
av_log(avctx, AV_LOG_ERROR, "Invalid sample count: %u.\n", nblocks);
av_log(avctx, AV_LOG_ERROR, "Invalid sample count: %"PRIu32".\n",
nblocks);
return AVERROR_INVALIDDATA;
}
s->samples = nblocks;
......
......@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include "avcodec.h"
#include "bytestream.h"
#include "bmp.h"
......@@ -58,7 +60,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
fsize = bytestream_get_le32(&buf);
if (buf_size < fsize) {
av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %d), trying to decode anyway\n",
av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %u), trying to decode anyway\n",
buf_size, fsize);
fsize = buf_size;
}
......@@ -69,7 +71,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
hsize = bytestream_get_le32(&buf); /* header size */
ihsize = bytestream_get_le32(&buf); /* more header size */
if (ihsize + 14 > hsize) {
av_log(avctx, AV_LOG_ERROR, "invalid header size %d\n", hsize);
av_log(avctx, AV_LOG_ERROR, "invalid header size %u\n", hsize);
return AVERROR_INVALIDDATA;
}
......@@ -78,7 +80,8 @@ static int bmp_decode_frame(AVCodecContext *avctx,
fsize = buf_size - 2;
if (fsize <= hsize) {
av_log(avctx, AV_LOG_ERROR, "declared file size is less than header size (%d < %d)\n",
av_log(avctx, AV_LOG_ERROR,
"Declared file size is less than header size (%u < %u)\n",
fsize, hsize);
return AVERROR_INVALIDDATA;
}
......@@ -166,7 +169,9 @@ static int bmp_decode_frame(AVCodecContext *avctx,
else if (rgb[0] == 0x0F00 && rgb[1] == 0x00F0 && rgb[2] == 0x000F)
avctx->pix_fmt = AV_PIX_FMT_RGB444;
else {
av_log(avctx, AV_LOG_ERROR, "Unknown bitfields %0X %0X %0X\n", rgb[0], rgb[1], rgb[2]);
av_log(avctx, AV_LOG_ERROR,
"Unknown bitfields %0"PRIX32" %0"PRIX32" %0"PRIX32"\n",
rgb[0], rgb[1], rgb[2]);
return AVERROR(EINVAL);
}
}
......@@ -182,12 +187,13 @@ static int bmp_decode_frame(AVCodecContext *avctx,
if (hsize - ihsize - 14 > 0) {
avctx->pix_fmt = AV_PIX_FMT_PAL8;
} else {
av_log(avctx, AV_LOG_ERROR, "Unknown palette for %d-colour BMP\n", 1<<depth);
av_log(avctx, AV_LOG_ERROR, "Unknown palette for %u-colour BMP\n",
1 << depth);
return AVERROR_INVALIDDATA;
}
break;
default:
av_log(avctx, AV_LOG_ERROR, "depth %d not supported\n", depth);
av_log(avctx, AV_LOG_ERROR, "depth %u not supported\n", depth);
return AVERROR_INVALIDDATA;
}
......@@ -235,7 +241,9 @@ static int bmp_decode_frame(AVCodecContext *avctx,
buf = buf0 + 46;
t = bytestream_get_le32(&buf);
if (t < 0 || t > (1 << depth)) {
av_log(avctx, AV_LOG_ERROR, "Incorrect number of colors - %X for bitdepth %d\n", t, depth);
av_log(avctx, AV_LOG_ERROR,
"Incorrect number of colors - %X for bitdepth %u\n",
t, depth);
} else if (t) {
colors = t;
}
......
......@@ -20,6 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include "libavutil/intreadwrite.h"
#include "dsputil.h"
#include "get_bits.h"
......@@ -367,7 +369,7 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data,
info_offset = AV_RL32(src + 4);
if (info_offset > UINT32_MAX - 8 || info_offset + 8 > avpkt->size) {
av_log(avctx, AV_LOG_ERROR,
"Invalid INFO header offset: 0x%08X is too large.\n",
"Invalid INFO header offset: 0x%08"PRIX32" is too large.\n",
info_offset);
return AVERROR_INVALIDDATA;
}
......
......@@ -20,11 +20,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/avassert.h"
#include <inttypes.h>
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
......@@ -369,7 +371,8 @@ static int dfa_decode_frame(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;
}
} else {
av_log(avctx, AV_LOG_WARNING, "Ignoring unknown chunk type %d\n",
av_log(avctx, AV_LOG_WARNING,
"Ignoring unknown chunk type %"PRIu32"\n",
chunk_type);
}
buf += chunk_size;
......
......@@ -20,6 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#define BITSTREAM_READER_LE
#include "avcodec.h"
#include "bytestream.h"
......@@ -269,18 +271,18 @@ static int dxtory_decode_v2_565(AVCodecContext *avctx, AVFrame *pic,
slice_size = bytestream2_get_le32(&gb);
if (slice_size > src_size - off) {
av_log(avctx, AV_LOG_ERROR,
"invalid slice size %d (only %d bytes left)\n",
"invalid slice size %"PRIu32" (only %"PRIu32" bytes left)\n",
slice_size, src_size - off);
return AVERROR_INVALIDDATA;
}
if (slice_size <= 16) {
av_log(avctx, AV_LOG_ERROR, "invalid slice size %d\n", slice_size);
av_log(avctx, AV_LOG_ERROR, "invalid slice size %"PRIu32"\n", slice_size);
return AVERROR_INVALIDDATA;
}
if (AV_RL32(src + off) != slice_size - 16) {
av_log(avctx, AV_LOG_ERROR,
"Slice sizes mismatch: got %d instead of %d\n",
"Slice sizes mismatch: got %"PRIu32" instead of %"PRIu32"\n",
AV_RL32(src + off), slice_size - 16);
}
init_get_bits(&gb2, src + off + 16, (slice_size - 16) * 8);
......@@ -350,18 +352,19 @@ static int dxtory_decode_v2_rgb(AVCodecContext *avctx, AVFrame *pic,
slice_size = bytestream2_get_le32(&gb);
if (slice_size > src_size - off) {
av_log(avctx, AV_LOG_ERROR,
"invalid slice size %d (only %d bytes left)\n",
"invalid slice size %"PRIu32" (only %"PRIu32" bytes left)\n",
slice_size, src_size - off);
return AVERROR_INVALIDDATA;
}
if (slice_size <= 16) {
av_log(avctx, AV_LOG_ERROR, "invalid slice size %d\n", slice_size);
av_log(avctx, AV_LOG_ERROR, "invalid slice size %"PRIu32"\n",
slice_size);
return AVERROR_INVALIDDATA;
}
if (AV_RL32(src + off) != slice_size - 16) {
av_log(avctx, AV_LOG_ERROR,
"Slice sizes mismatch: got %d instead of %d\n",
"Slice sizes mismatch: got %"PRIu32" instead of %"PRIu32"\n",
AV_RL32(src + off), slice_size - 16);
}
init_get_bits(&gb2, src + off + 16, (slice_size - 16) * 8);
......@@ -448,18 +451,18 @@ static int dxtory_decode_v2_410(AVCodecContext *avctx, AVFrame *pic,
slice_height = (next_y & ~3) - (cur_y & ~3);
if (slice_size > src_size - off) {
av_log(avctx, AV_LOG_ERROR,
"invalid slice size %d (only %d bytes left)\n",
"invalid slice size %"PRIu32" (only %"PRIu32" bytes left)\n",
slice_size, src_size - off);
return AVERROR_INVALIDDATA;
}
if (slice_size <= 16) {
av_log(avctx, AV_LOG_ERROR, "invalid slice size %d\n", slice_size);
av_log(avctx, AV_LOG_ERROR, "invalid slice size %"PRIu32"\n", slice_size);
return AVERROR_INVALIDDATA;
}
if (AV_RL32(src + off) != slice_size - 16) {
av_log(avctx, AV_LOG_ERROR,
"Slice sizes mismatch: got %d instead of %d\n",
"Slice sizes mismatch: got %"PRIu32" instead of %"PRIu32"\n",
AV_RL32(src + off), slice_size - 16);
}
init_get_bits(&gb2, src + off + 16, (slice_size - 16) * 8);
......@@ -552,18 +555,18 @@ static int dxtory_decode_v2_420(AVCodecContext *avctx, AVFrame *pic,
slice_height = (next_y & ~1) - (cur_y & ~1);
if (slice_size > src_size - off) {
av_log(avctx, AV_LOG_ERROR,
"invalid slice size %d (only %d bytes left)\n",
"invalid slice size %"PRIu32" (only %"PRIu32" bytes left)\n",
slice_size, src_size - off);
return AVERROR_INVALIDDATA;
}
if (slice_size <= 16) {
av_log(avctx, AV_LOG_ERROR, "invalid slice size %d\n", slice_size);
av_log(avctx, AV_LOG_ERROR, "invalid slice size %"PRIu32"\n", slice_size);
return AVERROR_INVALIDDATA;
}
if (AV_RL32(src + off) != slice_size - 16) {
av_log(avctx, AV_LOG_ERROR,
"Slice sizes mismatch: got %d instead of %d\n",
"Slice sizes mismatch: got %"PRIu32" instead of %"PRIu32"\n",
AV_RL32(src + off), slice_size - 16);
}
init_get_bits(&gb2, src + off + 16, (slice_size - 16) * 8);
......@@ -645,18 +648,18 @@ static int dxtory_decode_v2_444(AVCodecContext *avctx, AVFrame *pic,
slice_size = bytestream2_get_le32(&gb);
if (slice_size > src_size - off) {
av_log(avctx, AV_LOG_ERROR,
"invalid slice size %d (only %d bytes left)\n",
"invalid slice size %"PRIu32" (only %"PRIu32" bytes left)\n",
slice_size, src_size - off);
return AVERROR_INVALIDDATA;
}
if (slice_size <= 16) {
av_log(avctx, AV_LOG_ERROR, "invalid slice size %d\n", slice_size);
av_log(avctx, AV_LOG_ERROR, "invalid slice size %"PRIu32"\n", slice_size);
return AVERROR_INVALIDDATA;
}
if (AV_RL32(src + off) != slice_size - 16) {
av_log(avctx, AV_LOG_ERROR,
"Slice sizes mismatch: got %d instead of %d\n",
"Slice sizes mismatch: got %"PRIu32" instead of %"PRIu32"\n",
AV_RL32(src + off), slice_size - 16);
}
init_get_bits(&gb2, src + off + 16, (slice_size - 16) * 8);
......@@ -728,7 +731,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
ret = dxtory_decode_v2_565(avctx, pic, src + 16, avpkt->size - 16, 0);
break;
default:
avpriv_request_sample(avctx, "Frame header %X", AV_RB32(src));
avpriv_request_sample(avctx, "Frame header %"PRIX32, AV_RB32(src));
return AVERROR_PATCHWELCOME;
}
......
......@@ -24,6 +24,7 @@
* Go2Webinar decoder
*/
#include <inttypes.h>
#include <zlib.h>
#include "libavutil/intreadwrite.h"
......@@ -504,19 +505,19 @@ static int g2m_load_cursor(AVCodecContext *avctx, G2MContext *c,
if (cursor_w < 1 || cursor_w > 256 ||
cursor_h < 1 || cursor_h > 256) {
av_log(avctx, AV_LOG_ERROR, "Invalid cursor dimensions %dx%d\n",
av_log(avctx, AV_LOG_ERROR, "Invalid cursor dimensions %"PRIu32"x%"PRIu32"\n",
cursor_w, cursor_h);
return AVERROR_INVALIDDATA;
}
if (cursor_hot_x > cursor_w || cursor_hot_y > cursor_h) {
av_log(avctx, AV_LOG_WARNING, "Invalid hotspot position %d,%d\n",
av_log(avctx, AV_LOG_WARNING, "Invalid hotspot position %"PRIu32",%"PRIu32"\n",
cursor_hot_x, cursor_hot_y);
cursor_hot_x = FFMIN(cursor_hot_x, cursor_w - 1);
cursor_hot_y = FFMIN(cursor_hot_y, cursor_h - 1);
}
if (cur_size - 9 > bytestream2_get_bytes_left(gb) ||
c->cursor_w * c->cursor_h / 4 > cur_size) {
av_log(avctx, AV_LOG_ERROR, "Invalid cursor data size %d/%d\n",
av_log(avctx, AV_LOG_ERROR, "Invalid cursor data size %"PRIu32"/%u\n",
cur_size, bytestream2_get_bytes_left(gb));
return AVERROR_INVALIDDATA;
}
......@@ -693,7 +694,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
chunk_type = bytestream2_get_byte(&bc);
chunk_start = bytestream2_tell(&bc);
if (chunk_size > bytestream2_get_bytes_left(&bc)) {
av_log(avctx, AV_LOG_ERROR, "Invalid chunk size %d type %02X\n",
av_log(avctx, AV_LOG_ERROR, "Invalid chunk size %"PRIu32" type %02X\n",
chunk_size, chunk_type);
break;
}
......@@ -702,7 +703,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
got_header =
c->got_header = 0;
if (chunk_size < 21) {
av_log(avctx, AV_LOG_ERROR, "Invalid display info size %d\n",
av_log(avctx, AV_LOG_ERROR, "Invalid display info size %"PRIu32"\n",
chunk_size);
break;
}
......@@ -755,7 +756,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
b_mask = bytestream2_get_be32(&bc);
if (r_mask != 0xFF0000 || g_mask != 0xFF00 || b_mask != 0xFF) {
av_log(avctx, AV_LOG_ERROR,
"Invalid or unsupported bitmasks: R=%X, G=%X, B=%X\n",
"Invalid or unsupported bitmasks: R=%"PRIX32", G=%"PRIX32", B=%"PRIX32"\n",
r_mask, g_mask, b_mask);
ret = AVERROR_PATCHWELCOME;
goto header_fail;
......@@ -808,7 +809,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
break;
case CURSOR_POS:
if (chunk_size < 5) {
av_log(avctx, AV_LOG_ERROR, "Invalid cursor pos size %d\n",
av_log(avctx, AV_LOG_ERROR, "Invalid cursor pos size %"PRIu32"\n",
chunk_size);
break;
}
......@@ -817,7 +818,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
break;
case CURSOR_SHAPE:
if (chunk_size < 8) {
av_log(avctx, AV_LOG_ERROR, "Invalid cursor data size %d\n",
av_log(avctx, AV_LOG_ERROR, "Invalid cursor data size %"PRIu32"\n",
chunk_size);
break;
}
......@@ -829,7 +830,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
case CHUNK_CD:
break;
default:
av_log(avctx, AV_LOG_WARNING, "Skipping chunk type %02X\n",
av_log(avctx, AV_LOG_WARNING, "Skipping chunk type %02"PRIX32"\n",
chunk_type);
}
......
......@@ -25,6 +25,8 @@
* @author Michael Niedermayer <michaelni@gmx.at>
*/
#include <inttypes.h>
#include "libavutil/imgutils.h"
#include "internal.h"
#include "avcodec.h"
......@@ -213,7 +215,7 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps)
sps->time_scale = get_bits_long(&h->gb, 32);
if (!sps->num_units_in_tick || !sps->time_scale) {
av_log(h->avctx, AV_LOG_ERROR,
"time_scale/num_units_in_tick invalid or unsupported (%d/%d)\n",
"time_scale/num_units_in_tick invalid or unsupported (%"PRIu32"/%"PRIu32")\n",
sps->time_scale, sps->num_units_in_tick);
return AVERROR_INVALIDDATA;
}
......@@ -431,7 +433,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h)
if ((unsigned)sps->poc_cycle_length >=
FF_ARRAY_ELEMS(sps->offset_for_ref_frame)) {
av_log(h->avctx, AV_LOG_ERROR,
"poc_cycle_length overflow %u\n", sps->poc_cycle_length);
"poc_cycle_length overflow %d\n", sps->poc_cycle_length);
goto fail;
}
......@@ -486,7 +488,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h)
if (h->avctx->flags2 & CODEC_FLAG2_IGNORE_CROP) {
av_log(h->avctx, AV_LOG_DEBUG, "discarding sps cropping, original "
"values are l:%u r:%u t:%u b:%u\n",
"values are l:%d r:%d t:%d b:%d\n",
crop_left, crop_right, crop_top, crop_bottom);
sps->crop_left =
......@@ -546,7 +548,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:%d/%d/%d/%d %s %s %d/%d b%d reo:%d\n",
"sps:%u profile:%d/%d poc:%d ref:%d %dx%d %s %s crop:%u/%u/%u/%u %s %s %d/%d b%d reo:%d\n",
sps_id, sps->profile_idc, sps->level_idc,
sps->poc_type,
sps->ref_frame_count,
......@@ -715,7 +717,7 @@ int ff_h264_decode_picture_parameter_set(H264Context *h, int bit_length)
if (h->avctx->debug & FF_DEBUG_PICT_INFO) {
av_log(h->avctx, AV_LOG_DEBUG,
"pps:%u sps:%u %s slice_groups:%d ref:%d/%d %s qp:%d/%d/%d/%d %s %s %s %s\n",
"pps:%u sps:%u %s slice_groups:%d ref:%u/%u %s qp:%d/%d/%d/%d %s %s %s %s\n",
pps_id, pps->sps_id,
pps->cabac ? "CABAC" : "CAVLC",
pps->slice_group_count,
......
......@@ -26,6 +26,8 @@
* Indeo5 decoders.
*/
#include <inttypes.h>
#define BITSTREAM_READER_LE
#include "libavutil/attributes.h"
#include "libavutil/timer.h"
......@@ -513,7 +515,7 @@ static int ivi_decode_coded_blocks(GetBitContext *gb, IVIBandDesc *band,
val = IVI_TOSIGNED((hi << 6) | lo);
} else {
if (sym >= 256U) {
av_log(avctx, AV_LOG_ERROR, "Invalid sym encountered: %d.\n", sym);
av_log(avctx, AV_LOG_ERROR, "Invalid sym encountered: %"PRIu32".\n", sym);
return AVERROR_INVALIDDATA;
}
run = rvmap->runtab[sym];
......@@ -962,7 +964,7 @@ static int decode_band(IVI45DecContext *ctx,
if (chksum != band->checksum) {
av_log(avctx, AV_LOG_ERROR,
"Band checksum mismatch! Plane %d, band %d, "
"received: %x, calculated: %x\n",
"received: %"PRIx32", calculated: %"PRIx16"\n",
band->plane, band->band_num, band->checksum, chksum);
}
}
......
......@@ -25,6 +25,8 @@
* JPEG 2000 image decoder
*/
#include <inttypes.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
......@@ -446,7 +448,7 @@ static int get_cod(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c,
if (tmp.mct && s->ncomponents < 3) {
av_log(s->avctx, AV_LOG_ERROR,
"MCT %d with too few components (%d)\n",
"MCT %"PRIu8" with too few components (%d)\n",
tmp.mct, s->ncomponents);
return AVERROR_INVALIDDATA;
}
......@@ -598,12 +600,12 @@ static int get_sot(Jpeg2000DecoderContext *s, int n)
bytestream2_get_byteu(&s->g); // TNsot
if (Psot > bytestream2_get_bytes_left(&s->g) + n + 2) {
av_log(s->avctx, AV_LOG_ERROR, "Psot %d too big\n", Psot);
av_log(s->avctx, AV_LOG_ERROR, "Psot %"PRIu32" too big\n", Psot);
return AVERROR_INVALIDDATA;
}
if (TPsot >= FF_ARRAY_ELEMS(s->tile[Isot].tile_part)) {
avpriv_request_sample(s->avctx, "Support for %d components", TPsot);
avpriv_request_sample(s->avctx, "Support for %"PRIu8" components", TPsot);
return AVERROR_PATCHWELCOME;
}
......@@ -808,7 +810,7 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s,
|| sizeof(cblk->data) < cblk->length + cblk->lengthinc + 2
) {
av_log(s->avctx, AV_LOG_ERROR,
"Block length %d or lengthinc %d is too large\n",
"Block length %"PRIu16" or lengthinc %d is too large\n",
cblk->length, cblk->lengthinc);
return AVERROR_INVALIDDATA;
}
......@@ -1483,14 +1485,15 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
break;
default:
av_log(s->avctx, AV_LOG_ERROR,
"unsupported marker 0x%.4X at pos 0x%X\n",
"unsupported marker 0x%.4"PRIX16" at pos 0x%X\n",
marker, bytestream2_tell(&s->g) - 4);
bytestream2_skip(&s->g, len - 2);
break;
}
if (bytestream2_tell(&s->g) - oldpos != len || ret) {
av_log(s->avctx, AV_LOG_ERROR,
"error during processing marker segment %.4x\n", marker);
"error during processing marker segment %.4"PRIx16"\n",
marker);
return ret ? ret : -1;
}
}
......
......@@ -25,6 +25,8 @@
* @author Nathan Caldwell
*/
#include <inttypes.h>
#include "avcodec.h"
#include "get_bits.h"
#include "mathops.h"
......@@ -460,7 +462,7 @@ static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst,
if (read > length)
av_log(l->avctx, AV_LOG_WARNING,
"Output more bytes than length (%d of %d)\n", read,
"Output more bytes than length (%d of %"PRIu32")\n", read,
length);
} else if (esc_count < 8) {
esc_count -= 4;
......@@ -711,7 +713,7 @@ static int lag_decode_frame(AVCodecContext *avctx,
break;
default:
av_log(avctx, AV_LOG_ERROR,
"Unsupported Lagarith frame type: %#x\n", frametype);
"Unsupported Lagarith frame type: %#"PRIu8"\n", frametype);
return AVERROR_PATCHWELCOME;
}
......
......@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include <math.h>
#include <stdint.h>
......@@ -283,7 +284,7 @@ static av_cold int metasound_decode_init(AVCodecContext *avctx)
for (;;) {
if (!props->tag) {
av_log(avctx, AV_LOG_ERROR, "Could not find tag %08X\n", tag);
av_log(avctx, AV_LOG_ERROR, "Could not find tag %08"PRIX32"\n", tag);
return AVERROR_INVALIDDATA;
}
if (props->tag == tag) {
......
......@@ -24,6 +24,8 @@
* Apple MJPEG-B decoder.
*/
#include <inttypes.h>
#include "avcodec.h"
#include "mjpeg.h"
#include "mjpegdec.h"
......@@ -74,13 +76,14 @@ read_header:
}
field_size = get_bits_long(&hgb, 32); /* field size */
av_log(avctx, AV_LOG_DEBUG, "field size: 0x%x\n", field_size);
av_log(avctx, AV_LOG_DEBUG, "field size: 0x%"PRIx32"\n", field_size);
skip_bits(&hgb, 32); /* padded field size */
second_field_offs = read_offs(avctx, &hgb, buf_end - buf_ptr, "second_field_offs is %d and size is %d\n");
av_log(avctx, AV_LOG_DEBUG, "second field offs: 0x%x\n", second_field_offs);
av_log(avctx, AV_LOG_DEBUG, "second field offs: 0x%"PRIx32"\n",
second_field_offs);
dqt_offs = read_offs(avctx, &hgb, buf_end - buf_ptr, "dqt is %d and size is %d\n");
av_log(avctx, AV_LOG_DEBUG, "dqt offs: 0x%x\n", dqt_offs);
av_log(avctx, AV_LOG_DEBUG, "dqt offs: 0x%"PRIx32"\n", dqt_offs);
if (dqt_offs)
{
init_get_bits(&s->gb, buf_ptr+dqt_offs, (buf_end - (buf_ptr+dqt_offs))*8);
......@@ -91,7 +94,7 @@ read_header:
}
dht_offs = read_offs(avctx, &hgb, buf_end - buf_ptr, "dht is %d and size is %d\n");
av_log(avctx, AV_LOG_DEBUG, "dht offs: 0x%x\n", dht_offs);
av_log(avctx, AV_LOG_DEBUG, "dht offs: 0x%"PRIx32"\n", dht_offs);
if (dht_offs)
{
init_get_bits(&s->gb, buf_ptr+dht_offs, (buf_end - (buf_ptr+dht_offs))*8);
......@@ -100,7 +103,7 @@ read_header:
}
sof_offs = read_offs(avctx, &hgb, buf_end - buf_ptr, "sof is %d and size is %d\n");
av_log(avctx, AV_LOG_DEBUG, "sof offs: 0x%x\n", sof_offs);
av_log(avctx, AV_LOG_DEBUG, "sof offs: 0x%"PRIx32"\n", sof_offs);
if (sof_offs)
{
init_get_bits(&s->gb, buf_ptr+sof_offs, (buf_end - (buf_ptr+sof_offs))*8);
......@@ -110,9 +113,9 @@ read_header:
}
sos_offs = read_offs(avctx, &hgb, buf_end - buf_ptr, "sos is %d and size is %d\n");
av_log(avctx, AV_LOG_DEBUG, "sos offs: 0x%x\n", sos_offs);
av_log(avctx, AV_LOG_DEBUG, "sos offs: 0x%"PRIx32"\n", sos_offs);
sod_offs = read_offs(avctx, &hgb, buf_end - buf_ptr, "sof is %d and size is %d\n");
av_log(avctx, AV_LOG_DEBUG, "sod offs: 0x%x\n", sod_offs);
av_log(avctx, AV_LOG_DEBUG, "sod offs: 0x%"PRIx32"\n", sod_offs);
if (sos_offs)
{
init_get_bits(&s->gb, buf_ptr + sos_offs,
......
......@@ -26,6 +26,8 @@
*/
#define UNCHECKED_BITSTREAM_READER 1
#include <inttypes.h>
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "libavutil/stereo3d.h"
......@@ -1501,7 +1503,8 @@ static void mpeg_decode_picture_display_extension(Mpeg1Context *s1)
}
if (s->avctx->debug & FF_DEBUG_PICT_INFO)
av_log(s->avctx, AV_LOG_DEBUG, "pde (%d,%d) (%d,%d) (%d,%d)\n",
av_log(s->avctx, AV_LOG_DEBUG,
"pde (%"PRId16",%"PRId16") (%"PRId16",%"PRId16") (%"PRId16",%"PRId16")\n",
s1->pan_scan.position[0][0], s1->pan_scan.position[0][1],
s1->pan_scan.position[1][0], s1->pan_scan.position[1][1],
s1->pan_scan.position[2][0], s1->pan_scan.position[2][1]);
......@@ -2388,7 +2391,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
input_size = buf_end - buf_ptr;
if (avctx->debug & FF_DEBUG_STARTCODE)
av_log(avctx, AV_LOG_DEBUG, "%3X at %td left %d\n",
av_log(avctx, AV_LOG_DEBUG, "%3"PRIX32" at %td left %d\n",
start_code, buf_ptr - buf, input_size);
/* prepare data for next start code */
......
......@@ -23,6 +23,8 @@
* Common functions for Microsoft Screen 1 and 2
*/
#include <inttypes.h>
#include "libavutil/intfloat.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
......@@ -573,7 +575,7 @@ av_cold int ff_mss12_decode_init(MSS12Context *c, int version,
if (AV_RB32(avctx->extradata) < avctx->extradata_size) {
av_log(avctx, AV_LOG_ERROR,
"Insufficient extradata size: expected %d got %d\n",
"Insufficient extradata size: expected %"PRIu32" got %d\n",
AV_RB32(avctx->extradata),
avctx->extradata_size);
return AVERROR_INVALIDDATA;
......@@ -592,7 +594,7 @@ av_cold int ff_mss12_decode_init(MSS12Context *c, int version,
return AVERROR_INVALIDDATA;
}
av_log(avctx, AV_LOG_DEBUG, "Encoder version %d.%d\n",
av_log(avctx, AV_LOG_DEBUG, "Encoder version %"PRIu32".%"PRIu32"\n",
AV_RB32(avctx->extradata + 4), AV_RB32(avctx->extradata + 8));
if (version != AV_RB32(avctx->extradata + 4) > 1) {
av_log(avctx, AV_LOG_ERROR,
......@@ -609,13 +611,13 @@ av_cold int ff_mss12_decode_init(MSS12Context *c, int version,
}
av_log(avctx, AV_LOG_DEBUG, "%d free colour(s)\n", c->free_colours);
av_log(avctx, AV_LOG_DEBUG, "Display dimensions %dx%d\n",
av_log(avctx, AV_LOG_DEBUG, "Display dimensions %"PRIu32"x%"PRIu32"\n",
AV_RB32(avctx->extradata + 12), AV_RB32(avctx->extradata + 16));
av_log(avctx, AV_LOG_DEBUG, "Coded dimensions %dx%d\n",
avctx->coded_width, avctx->coded_height);
av_log(avctx, AV_LOG_DEBUG, "%g frames per second\n",
av_int2float(AV_RB32(avctx->extradata + 28)));
av_log(avctx, AV_LOG_DEBUG, "Bitrate %d bps\n",
av_log(avctx, AV_LOG_DEBUG, "Bitrate %"PRIu32" bps\n",
AV_RB32(avctx->extradata + 32));
av_log(avctx, AV_LOG_DEBUG, "Max. lead time %g ms\n",
av_int2float(AV_RB32(avctx->extradata + 36)));
......
......@@ -25,6 +25,8 @@
* RV10/RV20 decoder
*/
#include <inttypes.h>
#include "libavutil/imgutils.h"
#include "avcodec.h"
......@@ -507,7 +509,7 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx)
}
if (avctx->debug & FF_DEBUG_PICT_INFO) {
av_log(avctx, AV_LOG_DEBUG, "ver:%X ver0:%X\n", rv->sub_id,
av_log(avctx, AV_LOG_DEBUG, "ver:%X ver0:%"PRIX32"\n", rv->sub_id,
((uint32_t *) avctx->extradata)[0]);
}
......
......@@ -40,6 +40,8 @@
* http://samples.mplayerhq.hu/V-codecs/SVQ3/Vertical400kbit.sorenson3.mov
*/
#include <inttypes.h>
#include "libavutil/attributes.h"
#include "internal.h"
#include "avcodec.h"
......@@ -621,7 +623,8 @@ static int svq3_decode_mb(SVQ3Context *s, unsigned int mb_type)
vlc = svq3_get_ue_golomb(&h->gb);
if (vlc >= 25U) {
av_log(h->avctx, AV_LOG_ERROR, "luma prediction:%d\n", vlc);
av_log(h->avctx, AV_LOG_ERROR,
"luma prediction:%"PRIu32"\n", vlc);
return -1;
}
......@@ -690,7 +693,7 @@ static int svq3_decode_mb(SVQ3Context *s, unsigned int mb_type)
if (!IS_INTRA16x16(mb_type) &&
(!IS_SKIP(mb_type) || h->pict_type == AV_PICTURE_TYPE_B)) {
if ((vlc = svq3_get_ue_golomb(&h->gb)) >= 48U){
av_log(h->avctx, AV_LOG_ERROR, "cbp_vlc=%d\n", vlc);
av_log(h->avctx, AV_LOG_ERROR, "cbp_vlc=%"PRIu32"\n", vlc);
return -1;
}
......@@ -812,7 +815,7 @@ static int svq3_decode_slice_header(AVCodecContext *avctx)
}
if ((slice_id = svq3_get_ue_golomb(&h->gb)) >= 3) {
av_log(h->avctx, AV_LOG_ERROR, "illegal slice type %d \n", slice_id);
av_log(h->avctx, AV_LOG_ERROR, "illegal slice type %u \n", slice_id);
return -1;
}
......@@ -1001,7 +1004,7 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
}
buf = av_malloc(buf_len);
av_log(avctx, AV_LOG_DEBUG, "watermark size: %dx%d\n",
av_log(avctx, AV_LOG_DEBUG, "watermark size: %ux%u\n",
watermark_width, watermark_height);
av_log(avctx, AV_LOG_DEBUG,
"u1: %x u2: %x u3: %x compressed data size: %d offset: %d\n",
......@@ -1017,7 +1020,7 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
s->watermark_key = ff_svq1_packet_checksum(buf, buf_len, 0);
s->watermark_key = s->watermark_key << 16 | s->watermark_key;
av_log(avctx, AV_LOG_DEBUG,
"watermark key %#x\n", s->watermark_key);
"watermark key %#"PRIx32"\n", s->watermark_key);
av_free(buf);
#else
av_log(avctx, AV_LOG_ERROR,
......
......@@ -24,6 +24,8 @@
* Duck TrueMotion2 decoder.
*/
#include <inttypes.h>
#include "avcodec.h"
#include "bytestream.h"
#include "get_bits.h"
......@@ -246,7 +248,8 @@ static inline int tm2_read_header(TM2Context *ctx, const uint8_t *buf)
case TM2_NEW_HEADER_MAGIC:
return 0;
default:
av_log(ctx->avctx, AV_LOG_ERROR, "Not a TM2 header: 0x%08X\n", magic);
av_log(ctx->avctx, AV_LOG_ERROR, "Not a TM2 header: 0x%08"PRIX32"\n",
magic);
return AVERROR_INVALIDDATA;
}
}
......
......@@ -24,6 +24,8 @@
* TechSmith Screen Codec 2 decoder
*/
#include <inttypes.h>
#define BITSTREAM_READER_LE
#include "avcodec.h"
#include "get_bits.h"
......@@ -227,7 +229,8 @@ static int tscc2_decode_frame(AVCodecContext *avctx, void *data,
bytestream2_init(&gb, buf, buf_size);
frame_type = bytestream2_get_byte(&gb);
if (frame_type > 1) {
av_log(avctx, AV_LOG_ERROR, "Incorrect frame type %d\n", frame_type);
av_log(avctx, AV_LOG_ERROR, "Incorrect frame type %"PRIu32"\n",
frame_type);
return AVERROR_INVALIDDATA;
}
......@@ -309,7 +312,7 @@ static int tscc2_decode_frame(AVCodecContext *avctx, void *data,
}
}
if (bytestream2_get_bytes_left(&gb) < size) {
av_log(avctx, AV_LOG_ERROR, "Invalid slice size (%d/%d)\n",
av_log(avctx, AV_LOG_ERROR, "Invalid slice size (%"PRIu32"/%u)\n",
size, bytestream2_get_bytes_left(&gb));
return AVERROR_INVALIDDATA;
}
......
......@@ -24,6 +24,7 @@
* Ut Video decoder
*/
#include <inttypes.h>
#include <stdlib.h>
#include "libavutil/intreadwrite.h"
......@@ -367,7 +368,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
return AVERROR_INVALIDDATA;
}
c->frame_info = bytestream2_get_le32u(&gb);
av_log(avctx, AV_LOG_DEBUG, "frame information flags %X\n", c->frame_info);
av_log(avctx, AV_LOG_DEBUG, "frame information flags %"PRIX32"\n",
c->frame_info);
c->frame_pred = (c->frame_info >> 8) & 3;
......@@ -488,7 +490,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
if (c->frame_info_size != 4)
avpriv_request_sample(avctx, "Frame info not 4 bytes");
av_log(avctx, AV_LOG_DEBUG, "Encoding parameters %08X\n", c->flags);
av_log(avctx, AV_LOG_DEBUG, "Encoding parameters %08"PRIX32"\n", c->flags);
c->slices = (c->flags >> 24) + 1;
c->compression = c->flags & 1;
c->interlaced = c->flags & 0x800;
......
......@@ -22,6 +22,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
......@@ -197,7 +199,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
avpriv_report_missing_feature(avctx, "Bit-depth higher than 16");
return AVERROR_PATCHWELCOME;
} else {
av_log(avctx, AV_LOG_ERROR, "Unknown bit-depth: %d\n",
av_log(avctx, AV_LOG_ERROR, "Unknown bit-depth: %"PRIu8"\n",
s->bits_per_sample);
return AVERROR_INVALIDDATA;
}
......@@ -239,7 +241,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
s->bV3RTM = s->decode_flags & 0x100;
if (s->max_num_subframes > MAX_SUBFRAMES) {
av_log(avctx, AV_LOG_ERROR, "invalid number of subframes %i\n",
av_log(avctx, AV_LOG_ERROR, "invalid number of subframes %"PRIu8"\n",
s->max_num_subframes);
return AVERROR_INVALIDDATA;
}
......@@ -257,7 +259,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
if (s->num_channels < 0) {
av_log(avctx, AV_LOG_ERROR, "invalid number of channels %d\n",
av_log(avctx, AV_LOG_ERROR, "invalid number of channels %"PRId8"\n",
s->num_channels);
return AVERROR_INVALIDDATA;
} else if (s->num_channels > WMALL_MAX_CHANNELS) {
......@@ -382,7 +384,7 @@ static int decode_tilehdr(WmallDecodeCtx *s)
++chan->num_subframes;
if (num_samples[c] > s->samples_per_frame) {
av_log(s->avctx, AV_LOG_ERROR, "broken frame: "
"channel len(%d) > samples_per_frame(%d)\n",
"channel len(%"PRIu16") > samples_per_frame(%"PRIu16")\n",
num_samples[c], s->samples_per_frame);
return AVERROR_INVALIDDATA;
}
......@@ -1094,7 +1096,8 @@ static int decode_frame(WmallDecodeCtx *s)
if (len != (get_bits_count(gb) - s->frame_offset) + 2) {
/* FIXME: not sure if this is always an error */
av_log(s->avctx, AV_LOG_ERROR,
"frame[%i] would have to skip %i bits\n", s->frame_num,
"frame[%"PRIu32"] would have to skip %i bits\n",
s->frame_num,
len - (get_bits_count(gb) - s->frame_offset) - 1);
s->packet_loss = 1;
return 0;
......@@ -1213,7 +1216,8 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
if (!s->packet_loss &&
((s->packet_sequence_number + 1) & 0xF) != packet_sequence_number) {
s->packet_loss = 1;
av_log(avctx, AV_LOG_ERROR, "Packet loss detected! seq %x vs %x\n",
av_log(avctx, AV_LOG_ERROR,
"Packet loss detected! seq %"PRIx8" vs %x\n",
s->packet_sequence_number, packet_sequence_number);
}
s->packet_sequence_number = packet_sequence_number;
......
......@@ -86,6 +86,8 @@
* subframe in order to reconstruct the output samples.
*/
#include <inttypes.h>
#include "libavutil/float_dsp.h"
#include "libavutil/intfloat.h"
#include "libavutil/intreadwrite.h"
......@@ -336,7 +338,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
s->dynamic_range_compression = (s->decode_flags & 0x80);
if (s->max_num_subframes > MAX_SUBFRAMES) {
av_log(avctx, AV_LOG_ERROR, "invalid number of subframes %i\n",
av_log(avctx, AV_LOG_ERROR, "invalid number of subframes %"PRId8"\n",
s->max_num_subframes);
return AVERROR_INVALIDDATA;
}
......@@ -1421,7 +1423,8 @@ static int decode_frame(WMAProDecodeCtx *s, AVFrame *frame, int *got_frame_ptr)
if (len != (get_bits_count(gb) - s->frame_offset) + 2) {
/** FIXME: not sure if this is always an error */
av_log(s->avctx, AV_LOG_ERROR,
"frame[%i] would have to skip %i bits\n", s->frame_num,
"frame[%"PRIu32"] would have to skip %i bits\n",
s->frame_num,
len - (get_bits_count(gb) - s->frame_offset) - 1);
s->packet_loss = 1;
return 0;
......@@ -1553,7 +1556,8 @@ static int decode_packet(AVCodecContext *avctx, void *data,
if (!s->packet_loss &&
((s->packet_sequence_number + 1) & 0xF) != packet_sequence_number) {
s->packet_loss = 1;
av_log(avctx, AV_LOG_ERROR, "Packet loss detected! seq %x vs %x\n",
av_log(avctx, AV_LOG_ERROR,
"Packet loss detected! seq %"PRIx8" vs %x\n",
s->packet_sequence_number, packet_sequence_number);
}
s->packet_sequence_number = packet_sequence_number;
......
......@@ -20,6 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
......@@ -75,9 +77,11 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
ncolors = bytestream2_get_be32u(&gb);
bytestream2_skipu(&gb, header_size - (XWD_HEADER_SIZE - 20));
av_log(avctx, AV_LOG_DEBUG, "pixformat %d, pixdepth %d, bunit %d, bitorder %d, bpad %d\n",
av_log(avctx, AV_LOG_DEBUG,
"pixformat %"PRIu32", pixdepth %"PRIu32", bunit %"PRIu32", bitorder %"PRIu32", bpad %"PRIu32"\n",
pixformat, pixdepth, bunit, bitorder, bpad);
av_log(avctx, AV_LOG_DEBUG, "vclass %d, ncolors %d, bpp %d, be %d, lsize %d, xoffset %d\n",
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]);
......@@ -92,7 +96,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
}
if (xoffset) {
avpriv_request_sample(avctx, "xoffset %d", xoffset);
avpriv_request_sample(avctx, "xoffset %"PRIu32"", xoffset);
return AVERROR_PATCHWELCOME;
}
......@@ -141,7 +145,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
}
if (pixformat != XWD_Z_PIXMAP) {
avpriv_report_missing_feature(avctx, "Pixmap format %d", pixformat);
avpriv_report_missing_feature(avctx, "Pixmap format %"PRIu32, pixformat);
return AVERROR_PATCHWELCOME;
}
......@@ -196,7 +200,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
if (avctx->pix_fmt == AV_PIX_FMT_NONE) {
avpriv_request_sample(avctx,
"Unknown file: bpp %d, pixdepth %d, vclass %d",
"Unknown file: bpp %"PRIu32", pixdepth %"PRIu32", vclass %"PRIu32"",
bpp, pixdepth, vclass);
return AVERROR_PATCHWELCOME;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment