[vlc-commits] mkv: enter PGC's from DVD via the first Cell in the PGC

Steve Lhomme git at videolan.org
Thu Mar 17 17:07:10 CET 2016


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Mar 17 15:11:03 2016 +0100| [1b4e2b1524baa935f75b2159623608229ff80058] | committer: Jean-Baptiste Kempf

mkv: enter PGC's from DVD via the first Cell in the PGC

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

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

 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:



More information about the vlc-commits mailing list