wmapro: use av_float2int()
authorMans Rullgard <mans@mansr.com>
Sat, 10 Dec 2011 15:51:25 +0000 (15:51 +0000)
committerMans Rullgard <mans@mansr.com>
Sun, 11 Dec 2011 18:55:16 +0000 (18:55 +0000)
Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/wmaprodec.c

index b947eb8..a1b82db 100644 (file)
@@ -86,6 +86,7 @@
  * subframe in order to reconstruct the output samples.
  */
 
+#include "libavutil/intfloat.h"
 #include "libavutil/intreadwrite.h"
 #include "avcodec.h"
 #include "internal.h"
@@ -823,8 +824,8 @@ static int decode_coeffs(WMAProDecodeCtx *s, int c)
                     v1 = get_vlc2(&s->gb, vec1_vlc.table, VLCBITS, VEC1MAXDEPTH);
                     if (v1 == HUFF_VEC1_SIZE - 1)
                         v1 += ff_wma_get_large_val(&s->gb);
-                    vals[i  ] = ((av_alias32){ .f32 = v0 }).u32;
-                    vals[i+1] = ((av_alias32){ .f32 = v1 }).u32;
+                    vals[i  ] = av_float2int(v0);
+                    vals[i+1] = av_float2int(v1);
                 } else {
                     vals[i]   = fval_tab[symbol_to_vec2[idx] >> 4 ];
                     vals[i+1] = fval_tab[symbol_to_vec2[idx] & 0xF];