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 237c168..4017b77 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();