[FFmpeg-cvslog] avcodec/aacsbr_fixed: Replace a noise_facs_q check by an av_assert0

Michael Niedermayer git at videolan.org
Fri Nov 20 03:50:14 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Nov 20 03:36:10 2015 +0100| [8eadabf941a908101c69706063415d4ab6a630da] | committer: Michael Niedermayer

avcodec/aacsbr_fixed: Replace a noise_facs_q check by an av_assert0

The replaced check should have become redundant

Found-by: Andreas Cadhalpun <andreas.cadhalpun at googlemail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/aacsbr_fixed.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libavcodec/aacsbr_fixed.c b/libavcodec/aacsbr_fixed.c
index 6ec39c1..2473de4 100644
--- a/libavcodec/aacsbr_fixed.c
+++ b/libavcodec/aacsbr_fixed.c
@@ -192,10 +192,7 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
                 temp1.exp = NOISE_FLOOR_OFFSET - \
                     sbr->data[0].noise_facs_q[e][k] + 2;
                 temp1.mant = 0x20000000;
-                if (temp1.exp > 66) { // temp1 > 1E20
-                    av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n");
-                    temp1 = FLOAT_1;
-                }
+                av_assert0(temp1.exp <= 66);
                 temp2.exp = 12 - sbr->data[1].noise_facs_q[e][k] + 1;
                 temp2.mant = 0x20000000;
                 fac   = av_div_sf(temp1, av_add_sf(FLOAT_1, temp2));



More information about the ffmpeg-cvslog mailing list