[vlc-devel] [PATCH] mkv: Fix multisegment ordered editions
Denis Charmet
typx at dinauz.org
Sat Apr 23 23:36:21 CEST 2016
This patch restores the correct virtual stop time of a chapter.
---
modules/demux/mkv/virtual_segment.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index b1e7508..a014a7e 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -74,9 +74,12 @@ virtual_chapter_c * virtual_chapter_c::CreateVirtualChapter( chapter_item_c * p_
if( p_vsubchap )
sub_chapters.push_back( p_vsubchap );
- }
- int64_t stop = ( b_ordered && (p_chap->i_end_time == -1 ||
- (p_chap->i_end_time - p_chap->i_start_time) < (tmp - usertime_offset) )) ? tmp : p_chap->i_end_time;
+ }
+ int64_t stop = ( b_ordered )?
+ (((p_chap->i_end_time == -1 ||
+ (p_chap->i_end_time - p_chap->i_start_time) < (tmp - usertime_offset) )) ? tmp :
+ p_chap->i_end_time - p_chap->i_start_time + usertime_offset )
+ :p_chap->i_end_time;
virtual_chapter_c * p_vchap = new (std::nothrow) virtual_chapter_c( *p_segment, p_chap, start, stop, sub_chapters );
if( !p_vchap )
--
2.8.0.rc3
More information about the vlc-devel
mailing list