[FFmpeg-cvslog] avcodec/wmadec: initialize max_exponent to valid values
Michael Niedermayer
git at videolan.org
Sat Mar 8 01:46:51 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Mar 8 01:31:42 2014 +0100| [d1122b7ce5f5d9bb9bcdf5efe67e76778cd4260a] | committer: Michael Niedermayer
avcodec/wmadec: initialize max_exponent to valid values
Fixes generation of NaN output
Fixes: nan_example.wma
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d1122b7ce5f5d9bb9bcdf5efe67e76778cd4260a
---
libavcodec/wmadec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index e6a0b04..b1816b4 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -100,6 +100,9 @@ static av_cold int wma_decode_init(AVCodecContext * avctx)
}
}
+ for (i=0; i<MAX_CHANNELS; i++)
+ s->max_exponent[i] = 1.0;
+
if(ff_wma_init(avctx, flags2)<0)
return -1;
More information about the ffmpeg-cvslog
mailing list