Justin Ruggles <[email protected]> writes: > --- > libavcodec/wmaprodec.c | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c > index ce83bb6..871b838 100644 > --- a/libavcodec/wmaprodec.c > +++ b/libavcodec/wmaprodec.c > @@ -86,6 +86,7 @@ > * subframe in order to reconstruct the output samples. > */ > > +#include "libavutil/intfloat_readwrite.h" > #include "avcodec.h" > #include "internal.h" > #include "get_bits.h" > @@ -819,8 +820,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); > - ((float*)vals)[i ] = v0; > - ((float*)vals)[i+1] = v1; > + vals[i ] = av_flt2int((float)v0); > + vals[i+1] = av_flt2int((float)v1); > } else { > vals[i] = fval_tab[symbol_to_vec2[idx] >> 4 ]; > vals[i+1] = fval_tab[symbol_to_vec2[idx] & 0xF]; > --
av_flt2int is needlessly complicated if the machine is assumed, as we do, to use IEEE754 floats. The union punning from aacdec.c should me moved into a header and used instead. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
