[vlc-devel] [PATCH] avcodec: encoder: Fix win32 build

Rémi Denis-Courmont remi at remlab.net
Mon Apr 10 21:16:50 CEST 2017


Le maanantaina 10. huhtikuuta 2017, 20.45.04 EEST Francois Cartegnie a écrit :
> Le 10/04/2017 à 20:24, Filip Roséen a écrit :
> >> @@ -586,7 +588,8 @@ int OpenEncoder( vlc_object_t *p_this )
> >> 
> >>          p_context->lumi_masking = p_sys->f_lumi_masking;
> >>          p_context->dark_masking = p_sys->f_dark_masking;
> >>          p_context->p_masking = p_sys->f_p_masking;
> >> 
> >> -        p_context->border_masking = p_sys->f_border_masking;
> >> +        sprintf(option_buff, "%f", p_sys->f_border_masking);
> > 
> > Personally I would rest a little easier if `snprintf` was used instead
> > of `sprintf`, not that I am aware of any platform where the
> > string-representation of a `float` can yield a string longer than
> > `128`, but better safe than sorry.
> 
> Pretty sure you can do funky stuff using LC_

I checked many years ago. With regards to %f, the only locale change is the 
decimal separator. And that was always either comma or dot.

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list