[vlc-commits] mkv: use the chapter end time for duration rather than the sum of sub chapters

Steve Lhomme git at videolan.org
Wed Mar 16 13:55:28 CET 2016


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Wed Mar 16 13:43:30 2016 +0100| [149bb4d7a2cab2101a1839f97bba309777305af7] | committer: Jean-Baptiste Kempf

mkv: use the chapter end time for duration rather than the sum of sub chapters

when the information is available

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/demux/mkv/virtual_segment.cpp |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index 2aab473..aa11361 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -85,11 +85,8 @@ virtual_chapter_c * virtual_chapter_c::CreateVirtualChapter( chapter_item_c * p_
         return NULL;
     }
 
-    if( tmp == usertime_offset )
-    {
-        if ( p_chap->i_end_time >= 0 )
-            usertime_offset += p_chap->i_end_time - p_chap->i_start_time;
-    }
+    if ( p_chap->i_end_time >= 0 )
+        usertime_offset += p_chap->i_end_time - p_chap->i_start_time;
     else
         usertime_offset = tmp;
 



More information about the vlc-commits mailing list