[vlc-devel] [RFC 2/2] variables: Reduce InheritURational precision
Ilkka Ollakka
ileoo at videolan.org
Thu Mar 31 09:39:02 CEST 2016
On Mon, Mar 28, 2016 at 02:28:18PM +0200, Hugo Beauzée-Luyssen wrote:
> When providing FPS as a floating number, this function can potentially return extremely high numbers.
> For instance, with 29.97, it yields num=1005626327 and den=33554432
> These numbers are then likely to be used for a date computation, which
> again, during my tests, ends up overflowing the destination int64.
> By reducing the precision, the results are more sensible (29.97 yields
> 30689/1024, which is much closer to the expected 30000/1001)
Hi,
Most likely you could just use vlc_ureduce() and set the max parameter to something reasonable
in transcode module itself?
--
Ilkka Ollakka
More information about the vlc-devel
mailing list