[FFmpeg-devel] [PATCH v1] filter select - avoid 2 times rounding

Ulf Zibis Ulf.Zibis at CoSoCo.de
Fri Jul 19 20:17:02 EEST 2019


Am 19.07.19 um 18:57 schrieb Nicolas George:
>
>> avfilter/select: avoid twice rounding
> Maybe I a missing something, I see no change in rounding in this code.
So please give an alternative theory than a rounding issue, why I
actually experience a different result.

>  I suspect your diagnosis is wrong

In the current code there is a 1st rounding with "(double)(time_base.nom
/ time_base.den)" and then a 2nd with multipliying this value with
"frame->pts". In my code there is only 1 rounding after division of
(int64_t)(frame->pts * time_base.nom) with "(double)time_base.den".

Additionally I think, the video must have millions of hours to trap into
integer overflow with int64_t.

-Ulf




More information about the ffmpeg-devel mailing list