[FFmpeg-cvslog] bessel: check that the function terminates as expected by av_assert2().

Michael Niedermayer git at videolan.org
Thu Aug 9 01:55:06 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Aug  9 01:42:42 2012 +0200| [4ec03d138622b77887974a254861a425a57e02c3] | committer: Michael Niedermayer

bessel: check that the function terminates as expected by av_assert2().

A clear abort is better than wrong output and a possible crash.

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

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

 libswresample/resample.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libswresample/resample.c b/libswresample/resample.c
index cef2a81..7a5c7d7 100644
--- a/libswresample/resample.c
+++ b/libswresample/resample.c
@@ -78,6 +78,7 @@ static double bessel(double x){
         lastv=v;
         t *= x*inv[i];
         v += t;
+        av_assert2(i<99);
     }
     return v;
 }



More information about the ffmpeg-cvslog mailing list