[FFmpeg-devel] [PATCH] Apple Quicktime fix
al4321 at gmail.com
Tue Oct 11 21:46:11 EEST 2016
>>> + unsigned int timescale_new = (unsigned
>>> + * 1000 / (double)(st->time_base.num));
>> You surely don't need all these casts.
> Unless I'm guaranteed to get int64 on ALL platforms, I don't see
> how-to write this code without casts to double-float. Int32 will
> over-flow, even unsigned.
> I can do the multiply after the division, but afraid of losing precision.
> And since this is not a real-time code anyway, I consider this an
> "okay" trade-off.
> Feel free to replace it with a better alternative.
Do you suggest moving the multiplication after the division ?
More information about the ffmpeg-devel