1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2012-08-07 04:38:44 +02:00
parent 3865ec2ace
commit 29d1df66ad

View File

@ -263,7 +263,10 @@ static inline int l3_unscale(int value, int exponent)
e = table_4_3_exp [4 * value + (exponent & 3)]; e = table_4_3_exp [4 * value + (exponent & 3)];
m = table_4_3_value[4 * value + (exponent & 3)]; m = table_4_3_value[4 * value + (exponent & 3)];
e -= exponent >> 2; 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) if (e > 31)
return 0; return 0;
m = (m + (1 << (e - 1))) >> e; m = (m + (1 << (e - 1))) >> e;