Commit 0b172d93 authored by Filip Roséen's avatar Filip Roséen Committed by Jean-Baptiste Kempf

mkv: Fix multisegment ordered editions

This patch restores the correct virtual stop time of a chapter.

[ originally submitted by Denis Charmet ]
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 11b3334e
......@@ -75,8 +75,11 @@ 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 )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment