[vlc-commits] demux:adaptive: process the milliseconds in a separate variable
Steve Lhomme
git at videolan.org
Fri Jul 6 09:20:49 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun 11 14:30:52 2018 +0200| [2af6545f9dcc6125561e4b14035d61042c779a9e] | committer: Steve Lhomme
demux:adaptive: process the milliseconds in a separate variable
And then convert to vlc_tick_t using VLC_TICK_FROM_MS().
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2af6545f9dcc6125561e4b14035d61042c779a9e
---
modules/demux/adaptive/tools/Conversions.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/demux/adaptive/tools/Conversions.cpp b/modules/demux/adaptive/tools/Conversions.cpp
index 698ca849aa..346fb97546 100644
--- a/modules/demux/adaptive/tools/Conversions.cpp
+++ b/modules/demux/adaptive/tools/Conversions.cpp
@@ -159,11 +159,11 @@ UTCTime::UTCTime(const std::string &str)
tm.tm_sec = values[UTCTIME_SEC];
tm.tm_isdst = 0;
- t = timegm( &tm );
- t += values[UTCTIME_TZ] * 60;
- t *= 1000;
- t += values[UTCTIME_MSEC];
- t *= CLOCK_FREQ / 1000;
+ int64_t mst = timegm( &tm );
+ mst += values[UTCTIME_TZ] * 60;
+ mst *= 1000;
+ mst += values[UTCTIME_MSEC];
+ t = VLC_TICK_FROM_MS(mst);
} catch(int) {
t = 0;
}
More information about the vlc-commits
mailing list