]> git.sesse.net Git - vlc/commitdiff
Do not create empty title (avformat).
authorLaurent Aimar <fenrir@videolan.org>
Wed, 11 Feb 2009 23:07:20 +0000 (00:07 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 11 Feb 2009 23:07:20 +0000 (00:07 +0100)
modules/demux/avformat/demux.c

index 237c168d9c1f1ae2e6578c5e9d9ef31e8ef1fe1b..4017b77e93e9e3fc7636efc2aa4c54434270cb96 100644 (file)
@@ -321,7 +321,8 @@ int OpenDemux( vlc_object_t *p_this )
              p_sys->ic->duration * 1000000 / AV_TIME_BASE : -1 );
 
 #ifdef HAVE_FFMPEG_CHAPTERS
-    p_sys->p_title = vlc_input_title_New();
+    if( p_sys->ic->nb_chapters > 0 )
+        p_sys->p_title = vlc_input_title_New();
     for( i = 0; i < p_sys->ic->nb_chapters; i++ )
     {
         seekpoint_t *s = vlc_seekpoint_New();