avcodec/wmadec: initialize max_exponent to valid values
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 8 Mar 2014 00:31:42 +0000 (01:31 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 8 Mar 2014 00:46:22 +0000 (01:46 +0100)
Fixes generation of NaN output
Fixes: nan_example.wma
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/wmadec.c

index e6a0b04..b1816b4 100644 (file)
@@ -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;