From cc8163e1a3601a56f722a4720516e860bf1c6198 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Thu, 13 Mar 2014 12:13:33 +0100 Subject: avcodec: more correct printf specifiers --- libavcodec/wmalosslessdec.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'libavcodec/wmalosslessdec.c') diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 2f341c01c4..6ee27d3ddf 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -22,6 +22,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include "libavutil/attributes.h" #include "libavutil/avassert.h" @@ -192,7 +194,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; } @@ -234,7 +236,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; } @@ -252,7 +254,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) { @@ -377,7 +379,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; } @@ -1087,7 +1089,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; @@ -1202,7 +1205,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; -- cgit v1.2.3