ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
24.72k stars 5.28k forks source link

time unit incorrect in comments #3976

Open suzp1984 opened 3 months ago

suzp1984 commented 3 months ago

The time unit incorrect

https://github.com/ossrs/srs/blob/fa8096ad0117a085515729e12a3758ca26036552/trunk/src/core/srs_core_time.hpp#L33

time unit ms should be seconds.

// The time unit in **seconds**, for example 120 * SRS_UTIME_SECONDS means 120s.   ->
#define SRS_UTIME_SECONDS 1000000LL

srsu2si: convert long long to int

https://github.com/ossrs/srs/blob/fa8096ad0117a085515729e12a3758ca26036552/trunk/src/core/srs_core_time.hpp#L28

#define srsu2si(us) ((us) / SRS_UTIME_SECONDS) -> #define srsu2si(us) int ((us) / SRS_UTIME_SECONDS)

Version All SRS version

winlinvip commented 3 months ago

Nice work. Thank you.