diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-18 09:36:41 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-18 09:36:41 +0200 |
commit | dbe29db8cb09fb39bd8dc5b25934e92279d0aa8d (patch) | |
tree | a41e1d07fdfe657a7bdad14be679d10f8839fc4a /libavcodec/aacdec.c | |
parent | 68526dbc29473ec5820f7bb21e00204bb18b698e (diff) | |
download | ffmpeg-dbe29db8cb09fb39bd8dc5b25934e92279d0aa8d.tar.gz |
aacdec: more verbose overread error message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r-- | libavcodec/aacdec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 12c2b4a8b6..6e6c4d7fb6 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -112,7 +112,7 @@ static VLC vlc_scalefactors; static VLC vlc_spectral[11]; -static const char overread_err[] = "Input buffer exhausted before END element found\n"; +#define overread_err "Input buffer exhausted before END element found\n" static int count_channels(uint8_t (*layout)[3], int tags) { @@ -607,7 +607,7 @@ static int decode_pce(AVCodecContext *avctx, MPEG4AudioConfig *m4ac, skip_bits(gb, 3); // mixdown_coeff_index and pseudo_surround if (get_bits_left(gb) < 4 * (num_front + num_side + num_back + num_lfe + num_assoc_data + num_cc)) { - av_log(avctx, AV_LOG_ERROR, overread_err); + av_log(avctx, AV_LOG_ERROR, "decode_pce: " overread_err); return -1; } decode_channel_map(layout_map , AAC_CHANNEL_FRONT, gb, num_front); @@ -629,7 +629,7 @@ static int decode_pce(AVCodecContext *avctx, MPEG4AudioConfig *m4ac, /* comment field, first byte is length */ comment_len = get_bits(gb, 8) * 8; if (get_bits_left(gb) < comment_len) { - av_log(avctx, AV_LOG_ERROR, overread_err); + av_log(avctx, AV_LOG_ERROR, "decode_pce: " overread_err); return -1; } skip_bits_long(gb, comment_len); @@ -928,7 +928,7 @@ static int skip_data_stream_element(AACContext *ac, GetBitContext *gb) align_get_bits(gb); if (get_bits_left(gb) < 8 * count) { - av_log(ac->avctx, AV_LOG_ERROR, overread_err); + av_log(ac->avctx, AV_LOG_ERROR, "skip_data_stream_element: "overread_err); return -1; } skip_bits_long(gb, 8 * count); @@ -1062,7 +1062,7 @@ static int decode_band_types(AACContext *ac, enum BandType band_type[120], sect_len_incr = get_bits(gb, bits); sect_end += sect_len_incr; if (get_bits_left(gb) < 0) { - av_log(ac->avctx, AV_LOG_ERROR, overread_err); + av_log(ac->avctx, AV_LOG_ERROR, "decode_band_types: "overread_err); return -1; } if (sect_end > ics->max_sfb) { @@ -2467,7 +2467,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data, if (elem_id == 15) elem_id += get_bits(gb, 8) - 1; if (get_bits_left(gb) < 8 * elem_id) { - av_log(avctx, AV_LOG_ERROR, overread_err); + av_log(avctx, AV_LOG_ERROR, "TYPE_FIL: "overread_err); err = -1; goto fail; } |