[vlc-commits] mkv: only look for a new Chapter if the current one doesn't fit anymore

Steve Lhomme git at videolan.org
Thu Mar 17 16:58:27 CET 2016


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Mar 17 12:16:10 2016 +0100| [fd3fb918bd4cd1c3b78dbf39c5e489eb38dd9ca6] | committer: Jean-Baptiste Kempf

mkv: only look for a new Chapter if the current one doesn't fit anymore

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fd3fb918bd4cd1c3b78dbf39c5e489eb38dd9ca6
---

 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 2ae194a..44f21b6 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -432,7 +432,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 )



More information about the vlc-commits mailing list