Commit 43424ac2 authored by Denis Charmet's avatar Denis Charmet Committed by Jean-Baptiste Kempf
Browse files

MKV: Do not list chapters and titles when there is only one of them


Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent ce01d1fc
......@@ -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" );
title.i_seekpoint++;
title.seekpoint = (seekpoint_t**)xrealloc( title.seekpoint,
......@@ -551,6 +549,7 @@ int virtual_edition_c::PublishChapters( input_title_t & title, int & i_user_chap
i_seekpoint_num = i_user_chapters;
}
if( chapters.size() > 1 )
for( size_t i = 0; i < chapters.size(); i++ )
chapters[i]->PublishChapters( title, i_user_chapters, i_level );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment