diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-02-13 00:30:12 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-02-14 05:05:35 +0100 |
commit | 73e8fab31dc19c4371499e612856accbc00b2820 (patch) | |
tree | e089209c3bbea04f1bf98e3f9f433cf887699e07 /libavcodec/h264_ps.c | |
parent | f8c507f44b4c994895fc7ad954f009f61de69b1c (diff) | |
download | ffmpeg-73e8fab31dc19c4371499e612856accbc00b2820.tar.gz |
h264: print values in case of error
Also make error style consistent and drop redundant information.
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r-- | libavcodec/h264_ps.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index 033bb79309..88b973a783 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -311,7 +311,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h) sps_id = get_ue_golomb_31(&h->gb); if (sps_id >= MAX_SPS_COUNT) { - av_log(h->avctx, AV_LOG_ERROR, "sps_id (%d) out of range\n", sps_id); + av_log(h->avctx, AV_LOG_ERROR, "sps_id %u out of range\n", sps_id); return AVERROR_INVALIDDATA; } sps = av_mallocz(sizeof(SPS)); @@ -335,7 +335,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h) sps->chroma_format_idc = get_ue_golomb_31(&h->gb); if (sps->chroma_format_idc > 3) { av_log(h->avctx, AV_LOG_ERROR, - "chroma_format_idc (%u) out of range\n", + "chroma_format_idc %u out of range\n", sps->chroma_format_idc); goto fail; } else if (sps->chroma_format_idc == 3) { @@ -394,7 +394,8 @@ int ff_h264_decode_seq_parameter_set(H264Context *h) sps->ref_frame_count = get_ue_golomb_31(&h->gb); if (sps->ref_frame_count > MAX_PICTURE_COUNT - 2 || sps->ref_frame_count >= 32U) { - av_log(h->avctx, AV_LOG_ERROR, "too many reference frames\n"); + av_log(h->avctx, AV_LOG_ERROR, + "too many reference frames %d\n", sps->ref_frame_count); goto fail; } sps->gaps_in_frame_num_allowed_flag = get_bits1(&h->gb); @@ -529,7 +530,7 @@ int ff_h264_decode_picture_parameter_set(H264Context *h, int bit_length) int bits_left; if (pps_id >= MAX_PPS_COUNT) { - av_log(h->avctx, AV_LOG_ERROR, "pps_id (%d) out of range\n", pps_id); + av_log(h->avctx, AV_LOG_ERROR, "pps_id %u out of range\n", pps_id); return AVERROR_INVALIDDATA; } else if (h->sps.bit_depth_luma > 10) { av_log(h->avctx, AV_LOG_ERROR, @@ -544,7 +545,7 @@ int ff_h264_decode_picture_parameter_set(H264Context *h, int bit_length) pps->sps_id = get_ue_golomb_31(&h->gb); if ((unsigned)pps->sps_id >= MAX_SPS_COUNT || h->sps_buffers[pps->sps_id] == NULL) { - av_log(h->avctx, AV_LOG_ERROR, "sps_id out of range\n"); + av_log(h->avctx, AV_LOG_ERROR, "sps_id %u out of range\n", pps->sps_id); goto fail; } |