vlc | branch: master | Denis Charmet <t...@dinauz.org> | Wed Dec 14 15:31:27 2011 +0100| [43424ac2c4de2115c3461c46feae56c46ca449d5] | committer: Jean-Baptiste Kempf
MKV: Do not list chapters and titles when there is only one of them Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=43424ac2c4de2115c3461c46feae56c46ca449d5 --- modules/demux/mkv/virtual_segment.cpp | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp index 3388f0c..5ab7754 100644 --- a/modules/demux/mkv/virtual_segment.cpp +++ b/modules/demux/mkv/virtual_segment.cpp @@ -531,15 +531,13 @@ int virtual_edition_c::PublishChapters( input_title_t & title, int & i_user_chap { /* HACK for now don't expose edition as a seekpoint if its start time is the same than it's first chapter */ - if( chapters.size() > 0 && chapters[0]->i_virtual_start_time ) + if( chapters.size() > 0 && + chapters[0]->i_virtual_start_time && p_edition ) { seekpoint_t *sk = vlc_seekpoint_New(); sk->i_time_offset = 0; - if( p_edition ) - sk->psz_name = strdup( p_edition->psz_name.c_str() ); - else - sk->psz_name = strdup( "Dummy edition" ); + sk->psz_name = strdup( p_edition->psz_name.c_str() ); title.i_seekpoint++; title.seekpoint = (seekpoint_t**)xrealloc( title.seekpoint, @@ -551,8 +549,9 @@ int virtual_edition_c::PublishChapters( input_title_t & title, int & i_user_chap i_seekpoint_num = i_user_chapters; } - for( size_t i = 0; i < chapters.size(); i++ ) - chapters[i]->PublishChapters( title, i_user_chapters, i_level ); + if( chapters.size() > 1 ) + for( size_t i = 0; i < chapters.size(); i++ ) + chapters[i]->PublishChapters( title, i_user_chapters, i_level ); return i_user_chapters; } _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits