diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-02-14 13:35:45 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-14 13:35:45 +0100 |
commit | 60b46a00c62db3e366322f99d261480cd213bfa5 (patch) | |
tree | a3e8cb0ad9d920b6162332fd07cd5356191de38a /libavcodec/h264_ps.c | |
parent | 5cbd7ce016adec2beafe49be931ff445f3decdaf (diff) | |
parent | 73e8fab31dc19c4371499e612856accbc00b2820 (diff) | |
download | ffmpeg-60b46a00c62db3e366322f99d261480cd213bfa5.tar.gz |
Merge commit '73e8fab31dc19c4371499e612856accbc00b2820'
* commit '73e8fab31dc19c4371499e612856accbc00b2820':
h264: print values in case of error
Conflicts:
libavcodec/h264.c
libavcodec/h264_ps.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r-- | libavcodec/h264_ps.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index 04b29041c2..ee931e1b54 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -340,7 +340,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)); @@ -441,7 +441,8 @@ int ff_h264_decode_seq_parameter_set(H264Context *h) sps->ref_frame_count = FFMAX(2, sps->ref_frame_count); if (sps->ref_frame_count > MAX_PICTURE_COUNT - 2 || sps->ref_frame_count > 16U) { - 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); @@ -601,7 +602,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; } @@ -611,7 +612,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; } sps = h->sps_buffers[pps->sps_id]; |