[FFmpeg-cvslog] avcodec/lpc: Use a function pointer from an initialized context

Michael Niedermayer git at videolan.org
Sun Jun 30 12:41:55 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 30 12:34:50 2013 +0200| [e27be795f019a8ba41c33b0cf0e3a060069252ea] | committer: Michael Niedermayer

avcodec/lpc: Use a function pointer from an initialized context

Fixes null pointer dereference

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

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

 libavcodec/lpc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c
index 4f1ccce..657a66d 100644
--- a/libavcodec/lpc.c
+++ b/libavcodec/lpc.c
@@ -225,7 +225,7 @@ int ff_lpc_calc_coefs(LPCContext *s,
 
                 if(pass){
                     double eval, inv, rinv;
-                    eval= m[(pass-1)&1].evaluate_lls(&m[(pass-1)&1], var+1, max_order-1);
+                    eval= m[pass&1].evaluate_lls(&m[(pass-1)&1], var+1, max_order-1);
                     eval= (512>>pass) + fabs(eval - var[0]);
                     inv = 1/eval;
                     rinv = sqrt(inv);



More information about the ffmpeg-cvslog mailing list