[PATCH 1/2] hls: Increased the precision of the time scale

Jérémy VIGNELLES jeremy.vignelles at dev3i.fr
Wed Sep 25 10:15:01 CEST 2019


duration computations were made with precision loss, which add up and
leads to unprecise seeking if the stream is really long (like a day or two)
---
 modules/demux/hls/playlist/Parser.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp
index 54e18d8819..687fcebcbb 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -164,7 +164,7 @@ void M3U8Parser::parseSegments(vlc_object_t *, Representation *rep, const std::l
 {
     SegmentList *segmentList = new (std::nothrow) SegmentList(rep);
 
-    rep->setTimescale(100);
+    rep->setTimescale(1000000);
     rep->b_loaded = true;
 
     mtime_t totalduration = 0;
-- 
2.23.0.windows.1



More information about the vlc-devel mailing list