summaryrefslogtreecommitdiff
path: root/libavcodec/aacenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-04 22:54:29 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-05 00:18:01 +0200
commitd56834201bf7511ed497e956fb7ff78d49454b10 (patch)
tree6c2282b75df8f1a41df0f262a4b06850d86cdf0b /libavcodec/aacenc.c
parent60b433d905c582ed3656c120b3ffffd0119d5377 (diff)
aacenc: fix out of array writes
The value used in allocation is based on a estimate of the maximum size of the spectral coefficients multiplied with 2 and rounded up. The exact or a tighter limit should be found and used instead. But this issue shouldnt be left open until someone works on that. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r--libavcodec/aacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 9b2b2bbab5..383cb5a7c1 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -576,7 +576,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
}
start_ch += chans;
}
- if ((ret = ff_alloc_packet2(avctx, avpkt, 768 * s->channels))) {
+ if ((ret = ff_alloc_packet2(avctx, avpkt, 8192 * s->channels))) {
av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
return ret;
}