diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-07 04:38:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-07 04:45:06 +0200 |
commit | 29d1df66adb3723d1e7f2d363984b50792fb7c11 (patch) | |
tree | 9cd963ef1589e35546925cff57a9b68f2a177775 /libavcodec/mpegaudiodec.c | |
parent | 3865ec2acea976da695b9d4c8375d1af1449a446 (diff) | |
download | ffmpeg-29d1df66adb3723d1e7f2d363984b50792fb7c11.tar.gz |
mpegaudiodec: replace assert() by check under #ifdef DEBUG
The assert can be false with some invalid inputs, the check is
too expensive to always do though for just a warning message.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r-- | libavcodec/mpegaudiodec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 25a3975995..bcdbc5f819 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -263,7 +263,10 @@ static inline int l3_unscale(int value, int exponent) e = table_4_3_exp [4 * value + (exponent & 3)]; m = table_4_3_value[4 * value + (exponent & 3)]; e -= exponent >> 2; - assert(e >= 1); +#ifdef DEBUG + if(e < 1) + av_log(0, AV_LOG_WARNING, "l3_unscale: e is %d\n", e); +#endif if (e > 31) return 0; m = (m + (1 << (e - 1))) >> e; |