Browse code

aacenc: Fix a segfault in search_for_quantizers

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: Ronald S. Bultje <rsbultje@gmail.com>

Nathan Caldwell authored on 2011/03/08 17:22:14
Showing 2 changed files
... ...
@@ -598,7 +598,6 @@ static int aac_encode_frame(AVCodecContext *avctx,
598 598
             }
599 599
             for (j = 0; j < chans; j++) {
600 600
                 s->cur_channel = start_ch + j;
601
-                s->scoefs = cpe->ch[j].ret;
602 601
                 encode_individual_channel(avctx, s, &cpe->ch[j], cpe->common_window);
603 602
             }
604 603
             start_ch += chans;
... ...
@@ -63,8 +63,8 @@ typedef struct AACEncContext {
63 63
     int cur_channel;
64 64
     int last_frame;
65 65
     float lambda;
66
-    float *scoefs;                               ///< scaled coefficients
67 66
     DECLARE_ALIGNED(16, int,   qcoefs)[96];      ///< quantized coefficients
67
+    DECLARE_ALIGNED(16, float, scoefs)[1024];    ///< scaled coefficients
68 68
 } AACEncContext;
69 69
 
70 70
 #endif /* AVCODEC_AACENC_H */