[vlc-commits] demux: adaptative: fix wrong timeline duration

Francois Cartegnie git at videolan.org
Tue Oct 27 19:13:54 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Oct 25 15:03:34 2015 +0100| [3f1a8f848f818569c44671aef0d6057c00aa0e81] | committer: Francois Cartegnie

demux: adaptative: fix wrong timeline duration

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

 modules/demux/adaptative/playlist/SegmentInformation.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/adaptative/playlist/SegmentInformation.cpp b/modules/demux/adaptative/playlist/SegmentInformation.cpp
index 3515d14..14566ea 100644
--- a/modules/demux/adaptative/playlist/SegmentInformation.cpp
+++ b/modules/demux/adaptative/playlist/SegmentInformation.cpp
@@ -321,8 +321,8 @@ void SegmentInformation::getDurationsRange(mtime_t *min, mtime_t *max) const
 
     if(mediaSegmentTemplate && mediaSegmentTemplate->segmentTimeline.Get())
     {
-        const mtime_t duration = mediaSegmentTemplate->segmentTimeline.Get()->start() -
-                                 mediaSegmentTemplate->segmentTimeline.Get()->end();
+        const mtime_t duration = mediaSegmentTemplate->segmentTimeline.Get()->end() -
+                                 mediaSegmentTemplate->segmentTimeline.Get()->start();
 
         if (!*min || duration < *min)
             *min = duration;



More information about the vlc-commits mailing list