diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2009-11-10 04:17:18 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2009-11-10 04:17:18 +0000 |
commit | 00fa73f052c1c0c0185ee4d2accb8fba065132f1 (patch) | |
tree | d1f9769436eecb37456bcf13c71d74478e181c0d /libavcodec/lsp.c | |
parent | dccda293a0576d5414fafc0e95615c82a2f2399f (diff) | |
download | ffmpeg-00fa73f052c1c0c0185ee4d2accb8fba065132f1.tar.gz |
Avoid variable-length array use in ff_acelp_lspd2lpc()
Originally committed as revision 20496 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lsp.c')
-rw-r--r-- | libavcodec/lsp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/lsp.c b/libavcodec/lsp.c index 420921639f..ffd2410b48 100644 --- a/libavcodec/lsp.c +++ b/libavcodec/lsp.c @@ -157,9 +157,11 @@ static void lsp2polyf(const double *lsp, double *f, int lp_half_order) void ff_acelp_lspd2lpc(const double *lsp, float *lpc, int lp_half_order) { - double pa[lp_half_order+1], qa[lp_half_order+1]; + double pa[MAX_LP_HALF_ORDER+1], qa[MAX_LP_HALF_ORDER+1]; float *lpc2 = lpc + (lp_half_order << 1) - 1; + assert(lp_half_order <= MAX_LP_HALF_ORDER); + lsp2polyf(lsp, pa, lp_half_order); lsp2polyf(lsp + 1, qa, lp_half_order); |