[vlc-commits] demux: dash: fix live template number computing

Francois Cartegnie git at videolan.org
Sun May 15 20:15:39 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun May 15 20:00:20 2016 +0200| [a0cd97e642696cc11076d422506211d56a2a98a9] | committer: Francois Cartegnie

demux: dash: fix live template number computing

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a0cd97e642696cc11076d422506211d56a2a98a9
---

 modules/demux/dash/mpd/Representation.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/dash/mpd/Representation.cpp b/modules/demux/dash/mpd/Representation.cpp
index cffcf0d..54f963c 100644
--- a/modules/demux/dash/mpd/Representation.cpp
+++ b/modules/demux/dash/mpd/Representation.cpp
@@ -192,7 +192,7 @@ uint64_t Representation::getLiveTemplateNumberOffset(uint64_t index, const Media
             const stime_t duration = templ->duration.Get();
             const uint64_t timescale = templ->inheritTimescale();
             if(duration && timescale)
-                index += (playbackstart - streamstart) * CLOCK_FREQ / (timescale * duration);
+                index += (playbackstart - streamstart) * timescale / duration;
         }
     }
     return index;



More information about the vlc-commits mailing list