[vlc-devel] commit: Do not return title if no chapters in mkv. (Laurent Aimar )

git version control git at videolan.org
Fri Jul 18 21:23:23 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Jul 18 21:24:54 2008 +0200| [815e38a857fb6ed96f395abbef5023a9081aac38]

Do not return title if no chapters in mkv.

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

 modules/demux/mkv.cpp |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mkv.cpp b/modules/demux/mkv.cpp
index 00502b1..b75d8e1 100644
--- a/modules/demux/mkv.cpp
+++ b/modules/demux/mkv.cpp
@@ -1686,7 +1686,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             return VLC_SUCCESS;
 
         case DEMUX_GET_TITLE_INFO:
-            if( p_sys->titles.size() )
+            if( p_sys->titles.size() > 1 || ( p_sys->titles.size() == 1 && p_sys->titles[0]->i_seekpoint > 0 ) )
             {
                 input_title_t ***ppp_title = (input_title_t***)va_arg( args, input_title_t*** );
                 int *pi_int    = (int*)va_arg( args, int* );
@@ -1698,7 +1698,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
                 {
                     (*ppp_title)[i] = vlc_input_title_Duplicate( p_sys->titles[i] );
                 }
-
                 return VLC_SUCCESS;
             }
             return VLC_EGENERIC;




More information about the vlc-devel mailing list