diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-09 11:19:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-09 11:57:45 +0200 |
commit | 0dd99628ea15f1fe7121b8a983c0b1fe57660027 (patch) | |
tree | f74aca1123d89da43e7b1932df8341b5fafbcaf8 | |
parent | 3c5071db88b215d79a0b0f5b447d987b667e8817 (diff) | |
download | ffmpeg-0dd99628ea15f1fe7121b8a983c0b1fe57660027.tar.gz |
ff_lpc_calc_coefs: assert that the type is levinson or cholesky
Otherwise the code could misbehave (and there are no other types anyway)
Fixes CID700759
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/lpc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c index 657a66d09b..1d52edf744 100644 --- a/libavcodec/lpc.c +++ b/libavcodec/lpc.c @@ -182,6 +182,7 @@ int ff_lpc_calc_coefs(LPCContext *s, av_assert2(max_order >= MIN_LPC_ORDER && max_order <= MAX_LPC_ORDER && lpc_type > FF_LPC_TYPE_FIXED); + av_assert0(lpc_type == FF_LPC_TYPE_CHOLESKY || lpc_type == FF_LPC_TYPE_LEVINSON); /* reinit LPC context if parameters have changed */ if (blocksize != s->blocksize || max_order != s->max_order || |