[vlc-commits] demux/mkv: fix ES handling during DEMUX_SET_TITLE

Filip Roséen git at videolan.org
Tue Feb 21 13:44:13 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Mon Feb 20 18:10:20 2017 +0100| [a5859f25271db6bdb9d76fc0a08d4085b4c4a749] | committer: Jean-Baptiste Kempf

demux/mkv: fix ES handling during DEMUX_SET_TITLE

As part of seeking to a new virtual chapter, we have to destroy the
elementary streams that are part of the current one, and then create
the streams associated with the seeking-to virtual chapter.

This is done in virtual_segment_c::Seek, and is based on whether
p_current_vsegment->p_current_vchapter is equal to the virtual chapter
which we are seeking to.

The previous implementation would set "p_sys->p_current_vsegment->p_current_vchapter"
prior to calling virtual_segment_c::Seek, which makes the
seek-implementation think that we are seeking within the same virtual
chapter (retaining the previous elementary streams, and not creating
new ones).

By removing the relevant assignment under DEMUX_SET_TITLE we let
virtual_segment_c::Seek handle the necessary switching, preventing the
new title to be played from not having the necessary elementary-streams
created (to actually be playable).

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

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

 modules/demux/mkv/mkv.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 47e4d3e..1319b49 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -387,7 +387,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             {
                 p_sys->p_current_vsegment->i_current_edition = i_idx;
                 p_sys->i_current_title = i_idx;
-                p_sys->p_current_vsegment->p_current_vchapter = p_sys->p_current_vsegment->veditions[p_sys->p_current_vsegment->i_current_edition]->getChapterbyTimecode(0);
 
                 Seek( p_demux, static_cast<int64_t>( p_sys->titles[i_idx]->seekpoint[0]->i_time_offset ), -1, NULL);
                 p_demux->info.i_update |= INPUT_UPDATE_SEEKPOINT|INPUT_UPDATE_TITLE;



More information about the vlc-commits mailing list