[FFmpeg-cvslog] aacdec: more verbose overread error message

Michael Niedermayer git at videolan.org
Wed Apr 18 10:01:35 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Apr 18 09:36:41 2012 +0200| [dbe29db8cb09fb39bd8dc5b25934e92279d0aa8d] | committer: Michael Niedermayer

aacdec: more verbose overread error message

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dbe29db8cb09fb39bd8dc5b25934e92279d0aa8d
---

 libavcodec/aacdec.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 12c2b4a..6e6c4d7 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;
             }



More information about the ffmpeg-cvslog mailing list