From a3a61d4663ab7f2a26dd6d246d3884a166c8c626 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 6 Jul 2015 19:11:42 +0200 Subject: [PATCH] avcodec/lpc: Fix lpc_apply_welch_window_c() for odd len Also removes assert this fixes an assertion failure on non-x86 Signed-off-by: Michael Niedermayer --- libavcodec/lpc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c index deb02e7f58..07fc29265a 100644 --- a/libavcodec/lpc.c +++ b/libavcodec/lpc.c @@ -37,13 +37,19 @@ static void lpc_apply_welch_window_c(const int32_t *data, int len, double w; double c; - /* The optimization in commit fa4ed8c does not support odd len. - * If someone wants odd len extend that change. */ - av_assert2(!(len & 1)); - n2 = (len >> 1); c = 2.0 / (len - 1.0); + if (len & 1) { + for(i=0; i