[vlc-devel] [PATCH 1/5] mkv: only the first loaded segment knows which chapter it will start from
Steve Lhomme
robux4 at videolabs.io
Thu Mar 17 17:47:16 CET 2016
---
modules/demux/mkv/demux.cpp | 4 ++++
modules/demux/mkv/virtual_segment.cpp | 3 ---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index 144566b..8c84513 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -661,6 +661,10 @@ bool demux_sys_t::PreloadLinked()
if ( !p_current_vsegment )
return false;
+ /* Set current chapter */
+ p_current_vsegment->p_current_vchapter = p_current_vsegment->veditions[p_current_vsegment->i_current_edition]->getChapterbyTimecode(0);
+ msg_Dbg( &demuxer, "NEW START CHAPTER uid=%" PRId64, p_current_vsegment->p_current_vchapter->p_chapter->i_uid );
+
used_vsegments.push_back( p_current_vsegment );
for ( i=1; i< opened_segments.size(); i++ )
diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index c51163c..f59ff9a 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -320,9 +320,6 @@ virtual_segment_c::virtual_segment_c( matroska_segment_c & main_segment, std::ve
break;
}
}
- /* Set current chapter */
- p_current_vchapter = veditions[i_current_edition]->getChapterbyTimecode(0);
-
}
virtual_segment_c::~virtual_segment_c()
--
2.7.1
More information about the vlc-devel
mailing list