[vlc-devel] [PATCH] Fix the subtitles loss at MKV segment changes

Denis Charmet typx at dinauz.org
Thu Jan 12 21:22:43 CET 2012


This patch add the new es before deleting the old ones which causes
the default sub track to be used according to user preferences.

Fix #5625.
---
 modules/demux/mkv/virtual_segment.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index 623fbce..0f667f2 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -450,9 +450,9 @@ void virtual_segment_c::Seek( demux_t & demuxer, mtime_t i_date, mtime_t i_time_
 
         if( p_current_chapter->p_segment != p_chapter->p_segment )
         {
-            p_current_chapter->p_segment->UnSelect();
             es_out_Control( demuxer.out, ES_OUT_RESET_PCR );
             p_chapter->p_segment->Select( i_date );
+            p_current_chapter->p_segment->UnSelect();
         }
         p_current_chapter = p_chapter;
 
-- 
1.7.8.3




More information about the vlc-devel mailing list