[vlc-devel] [PATCH 7/8] mkv: use the chapter end time for duration rather than the sum of sub chapters

Steve Lhomme robux4 at videolabs.io
Wed Mar 16 13:43:30 CET 2016


when the information is available
---
 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;
 
-- 
2.7.2.windows.1



More information about the vlc-devel mailing list