avcodec: more correct printf specifiers

This commit is contained in:
Diego Biurrun
2014-03-13 12:13:33 +01:00
parent 7513234bdd
commit cc8163e1a3
26 changed files with 172 additions and 98 deletions

View File

@@ -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"
@@ -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;