[FFmpeg-devel] [PATCH] Use more appropriate types when decoding vorbisfloats

Rafaël Carré rafael.carre
Sat Jul 24 04:15:18 CEST 2010


On Fri, 23 Jul 2010 18:10:45 -0400
Alex Converse <alex.converse at gmail.com> wrote:

Hi,

> Index: libavcodec/vorbis_dec.c
> ===================================================================
> --- libavcodec/vorbis_dec.c	(revision 24471)
> +++ libavcodec/vorbis_dec.c	(working copy)
> @@ -178,11 +178,11 @@
>  
>  static float vorbisfloat2float(uint_fast32_t val)
>  {
> -    double mant = val & 0x1fffff;
> -    long exp    = (val & 0x7fe00000L) >> 21;
> +    float mant = val & 0x1fffff;
> +    int exp    = (val & 0x7fe00000L) >> 21;
                                     ^
Shouldn't the L be dropped too?

-- 
Rafa?l Carr?



More information about the ffmpeg-devel mailing list