]> git.sesse.net Git - ffmpeg/commitdiff
aacenc: Fix a segfault in search_for_quantizers
authorNathan Caldwell <saintdev@gmail.com>
Tue, 8 Mar 2011 08:22:14 +0000 (01:22 -0700)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 8 Mar 2011 11:39:34 +0000 (12:39 +0100)
This reverts the removal of scoefs from AACEncContext.
It resulted in scoefs being a NULL pointer when
search_for_quantizers() is called.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/aacenc.c
libavcodec/aacenc.h

index 17ae6f99d3d4da0e0b049e5c046a24375980a9d1..0ca390e72b7c2122ee792320f1ea2a541c4c485c 100644 (file)
@@ -598,7 +598,6 @@ static int aac_encode_frame(AVCodecContext *avctx,
             }
             for (j = 0; j < chans; j++) {
                 s->cur_channel = start_ch + j;
-                s->scoefs = cpe->ch[j].ret;
                 encode_individual_channel(avctx, s, &cpe->ch[j], cpe->common_window);
             }
             start_ch += chans;
index 3559234ff1617da839cc9f659f1093c25c042928..1c8467990c4f1b05fd5a9305976b0e1e20fd8c13 100644 (file)
@@ -63,8 +63,8 @@ typedef struct AACEncContext {
     int cur_channel;
     int last_frame;
     float lambda;
-    float *scoefs;                               ///< scaled coefficients
     DECLARE_ALIGNED(16, int,   qcoefs)[96];      ///< quantized coefficients
+    DECLARE_ALIGNED(16, float, scoefs)[1024];    ///< scaled coefficients
 } AACEncContext;
 
 #endif /* AVCODEC_AACENC_H */