1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Nathan Caldwell 2011-03-08 01:22:14 -07:00 committed by Michael Niedermayer
parent b543e1dccf
commit f56c4850e7
2 changed files with 1 additions and 2 deletions

View File

@ -598,7 +598,6 @@ static int aac_encode_frame(AVCodecContext *avctx,
} }
for (j = 0; j < chans; j++) { for (j = 0; j < chans; j++) {
s->cur_channel = start_ch + j; s->cur_channel = start_ch + j;
s->scoefs = cpe->ch[j].ret;
encode_individual_channel(avctx, s, &cpe->ch[j], cpe->common_window); encode_individual_channel(avctx, s, &cpe->ch[j], cpe->common_window);
} }
start_ch += chans; start_ch += chans;

View File

@ -63,8 +63,8 @@ typedef struct AACEncContext {
int cur_channel; int cur_channel;
int last_frame; int last_frame;
float lambda; float lambda;
float *scoefs; ///< scaled coefficients
DECLARE_ALIGNED(16, int, qcoefs)[96]; ///< quantized coefficients DECLARE_ALIGNED(16, int, qcoefs)[96]; ///< quantized coefficients
DECLARE_ALIGNED(16, float, scoefs)[1024]; ///< scaled coefficients
} AACEncContext; } AACEncContext;
#endif /* AVCODEC_AACENC_H */ #endif /* AVCODEC_AACENC_H */