summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2015-09-01 06:40:12 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2015-09-01 06:40:12 +0100
commitd09f9c45c7554e6d9b20be5b640f67fcf053250b (patch)
tree6b606b9ff99096a33e976c68e2ada77ed138ac49 /libavcodec
parent0fc3a51353509df107a8da192d8377f0121f7ab9 (diff)
aacenc: allocate a larger buffer for the TNS LPC context
Turns out autocorrelating more than 750 coefficients at once will cause a segfault, despite there being enough space to hold an entire frame of samples into the buffer. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 62dba34ee4..232eeda04f 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -825,7 +825,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
goto fail;
s->psypp = ff_psy_preprocess_init(avctx);
s->coder = &ff_aac_coders[s->options.aac_coder];
- ff_lpc_init(&s->lpc, avctx->frame_size, MAX_LPC_ORDER, FF_LPC_TYPE_LEVINSON);
+ ff_lpc_init(&s->lpc, 2*avctx->frame_size, TNS_MAX_ORDER, FF_LPC_TYPE_LEVINSON);
if (HAVE_MIPSDSPR1)
ff_aac_coder_init_mips(s);