[vlc-devel] [PATCH 5/8] mkv: a subchapter with no end timestamp cannot match the chapter looked for

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


---
 modules/demux/mkv/virtual_segment.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index bda0883..5b6193d 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -377,7 +377,8 @@ virtual_chapter_c* virtual_chapter_c::getSubChapterbyTimecode( int64_t time )
 {
     for( size_t i = 0; i < sub_vchapters.size(); i++ )
     {
-        if( time >= sub_vchapters[i]->i_mk_virtual_start_time && time < sub_vchapters[i]->i_mk_virtual_stop_time )
+        if( time >= sub_vchapters[i]->i_mk_virtual_start_time &&
+            ( sub_vchapters[i]->i_mk_virtual_stop_time < 0 || time < sub_vchapters[i]->i_mk_virtual_stop_time ) )
             return sub_vchapters[i]->getSubChapterbyTimecode( time );
     }
 
-- 
2.7.2.windows.1



More information about the vlc-devel mailing list