Skip to content

Commit

Permalink
[core] Fixed int64_t to long type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Aug 13, 2021
1 parent 6ca1e0d commit b214122
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions srtcore/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2171,8 +2171,8 @@ int srt::CUDTUnited::select(
{
const steady_clock::time_point entertime = steady_clock::now();

const long timeo_us = timeout
? timeout->tv_sec * 1000000 + timeout->tv_usec
const int64_t timeo_us = timeout
? static_cast<int64_t>(timeout->tv_sec) * 1000000 + timeout->tv_usec
: -1;
const steady_clock::duration timeo(microseconds_from(timeo_us));

Expand Down Expand Up @@ -2285,7 +2285,7 @@ int srt::CUDTUnited::selectEx(
{
const steady_clock::time_point entertime = steady_clock::now();

const long timeo_us = msTimeOut >= 0
const int64_t timeo_us = msTimeOut >= 0
? msTimeOut * 1000
: -1;
const steady_clock::duration timeo(microseconds_from(timeo_us));
Expand Down

0 comments on commit b214122

Please sign in to comment.