[vlc-devel] [PATCH 2/6] mkv: only look for a new Chapter if the current one doesn't fit anymore
Steve Lhomme
robux4 at videolabs.io
Thu Mar 17 12:16:10 CET 2016
---
modules/demux/mkv/virtual_segment.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index d1c2abd..4e3bf04 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -429,7 +429,12 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux )
}
if ( sys.i_pts != VLC_TS_INVALID )
- p_cur_vchapter = p_cur_vedition->getChapterbyTimecode( sys.i_pts - VLC_TS_0 );
+ {
+ if ( p_current_vchapter != NULL && p_current_vchapter->ContainsTimestamp( sys.i_pts - VLC_TS_0 ))
+ p_cur_vchapter = p_current_vchapter;
+ else
+ p_cur_vchapter = p_cur_vedition->getChapterbyTimecode( sys.i_pts - VLC_TS_0 );
+ }
/* we have moved to a new chapter */
if ( p_cur_vchapter != NULL && p_current_vchapter != p_cur_vchapter )
--
2.7.2.windows.1
More information about the vlc-devel
mailing list