>>> +                unsigned int timescale_new = (unsigned
>>> int)((double)(st->time_base.den)
>>> +                * 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 ?

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

Reply via email to