mirror of https://github.com/mpv-player/mpv
timer: fix previous commit
Sigh... of course the type of the (?:) exprsssion is double, so INT64_MAX was converted to double, which is a problem.
This commit is contained in:
parent
c9b68957c9
commit
2e6b0b4ee4
|
@ -70,7 +70,7 @@ int64_t mp_add_timeout(int64_t time_us, double timeout_sec)
|
||||||
{
|
{
|
||||||
assert(time_us > 0); // mp_time_us() returns strictly positive values
|
assert(time_us > 0); // mp_time_us() returns strictly positive values
|
||||||
double t = MPCLAMP(timeout_sec * (1000 * 1000), -0x1p63, 0x1p63);
|
double t = MPCLAMP(timeout_sec * (1000 * 1000), -0x1p63, 0x1p63);
|
||||||
int64_t ti = t == 0x1p63 ? INT64_MAX : t;
|
int64_t ti = t == 0x1p63 ? INT64_MAX : (int64_t)t;
|
||||||
if (ti > INT64_MAX - time_us)
|
if (ti > INT64_MAX - time_us)
|
||||||
return INT64_MAX;
|
return INT64_MAX;
|
||||||
if (ti <= -time_us)
|
if (ti <= -time_us)
|
||||||
|
|
Loading…
Reference in New Issue