[vlc-devel] [PATCH 2/2] mkv: enter PGC's from DVD via the first Cell in the PGC

Steve Lhomme robux4 at videolabs.io
Thu Mar 17 15:11:03 CET 2016


---
 modules/demux/mkv/chapter_command.cpp | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/modules/demux/mkv/chapter_command.cpp b/modules/demux/mkv/chapter_command.cpp
index ab49ad5..b859600 100644
--- a/modules/demux/mkv/chapter_command.cpp
+++ b/modules/demux/mkv/chapter_command.cpp
@@ -310,8 +310,14 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
             p_vchapter = sys.BrowseCodecPrivate( 1, MatchTitleNumber, &i_title, sizeof(i_title), p_vsegment );
             if ( p_vsegment != NULL && p_vchapter != NULL )
             {
-                sys.JumpTo( *p_vsegment, *p_vchapter );
-                f_result = true;
+                /* enter via the First Cell */
+                uint8 i_cell = 1;
+                p_vchapter = p_vchapter->BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchCellNumber, &i_cell, sizeof(i_cell) );
+                if ( p_vchapter != NULL )
+                {
+                    sys.JumpTo( *p_vsegment, *p_vchapter );
+                    f_result = true;
+                }
             }
 
             break;
@@ -353,8 +359,14 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
                     p_vchapter = sys.BrowseCodecPrivate( 1, MatchPgcType, &p_type, 1, p_vsegment );
                     if ( p_vsegment != NULL && p_vchapter != NULL )
                     {
-                        sys.JumpTo( *p_vsegment, *p_vchapter );
-                        f_result = true;
+                        /* enter via the first Cell */
+                        uint8 i_cell = 1;
+                        p_vchapter = p_vchapter->BrowseCodecPrivate( MATROSKA_CHAPTER_CODEC_DVD, MatchCellNumber, &i_cell, sizeof(i_cell) );
+                        if ( p_vchapter != NULL )
+                        {
+                            sys.JumpTo( *p_vsegment, *p_vchapter );
+                            f_result = true;
+                        }
                     }
                 break;
                 case 1:
-- 
2.7.1



More information about the vlc-devel mailing list