[vlc-devel] [RFC PATCH] vlc_config: add macro denoting the maximum timestamp
remi at remlab.net
Sun Oct 16 22:02:00 CEST 2016
Le sunnuntaina 16. lokakuuta 2016, 21.18.30 EEST Filip Roséen a écrit :
> This macro can be used to create a timestamp as far away in the future
> as possible. Former implementations used INT64_MAX directly, meaning
> that if we in the future decide to change the type of "mtime_t", we
> would have to change every usage of INT64_MAX for the related
There isn´t a larger integer type available and we definitely can´t shrink it,
so err? FWIW, the current range exceeds a quarter of a million years.
> These changes simply provides a macro that everyone can use, as well
> as replacing former usage of INT64_MAX with VLC_TS_MAX.
It won´t work. There are also plenty of INT64_C() and int64_t also involved in
time calculation. We also have lldiv() relying on long long being at least as
large as mtime_t. And who knows what I forget.
Also we can´t even increase the range because a lot of code depends on
CLOCK_FREQ being one million in subtle or not so subtle ways. Then again,
while I appreciate that certain use cases require higher precision, multimedia
timestamping really does not.
So this seems like a complete and utter waste of time.
Nonsponsored VLC developer
More information about the vlc-devel