[FFmpeg-cvslog] arm: fix use of uninitialised value in ff_fft_fixed_init_arm()
Mans Rullgard
git at videolan.org
Sat Dec 8 13:55:34 CET 2012
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Thu Dec 6 23:51:01 2012 +0000| [92dad6687f59a6e599834218626e524eb8a5bdae] | committer: Mans Rullgard
arm: fix use of uninitialised value in ff_fft_fixed_init_arm()
When initialising an FFTContext for a plain FFT, mdct_bits is not set
and can contain a garbage value. Since nbits is always valid and for
MDCT operation is mdct_bits - 2 checking this instead avoids using an
uninitialised value while having the same effect.
Signed-off-by: Mans Rullgard <mans at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=92dad6687f59a6e599834218626e524eb8a5bdae
---
libavcodec/arm/fft_fixed_init_arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/arm/fft_fixed_init_arm.c b/libavcodec/arm/fft_fixed_init_arm.c
index 5601ba1..50532f2 100644
--- a/libavcodec/arm/fft_fixed_init_arm.c
+++ b/libavcodec/arm/fft_fixed_init_arm.c
@@ -36,7 +36,7 @@ av_cold void ff_fft_fixed_init_arm(FFTContext *s)
s->fft_calc = ff_fft_fixed_calc_neon;
#if CONFIG_MDCT
- if (!s->inverse && s->mdct_bits >= 5) {
+ if (!s->inverse && s->nbits >= 3) {
s->mdct_permutation = FF_MDCT_PERM_INTERLEAVE;
s->mdct_calc = ff_mdct_fixed_calc_neon;
s->mdct_calcw = ff_mdct_fixed_calcw_neon;
More information about the ffmpeg-cvslog
mailing list