On Sun, Jun 07, 2015 at 09:29:20PM -0700, Mark Harris wrote:
> > -    sample_rate = ldexp(val, exp - 16383 - 63);
> > +    if (exp >= 0)
> > +        sample_rate = val << exp;
> > +    else
> > +        sample_rate = (val + (1<<(-exp/2))) >> -exp;
> 
> To round the value it should probably be something like:
>     sample_rate = (val + ((uint64_t)1<<(-exp-1))) >> -exp;
> 
> To avoid possible undefined behavior it would also need to check that
> exp is within range.

changed

applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are best at talking, realize last or never when they are wrong.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to