[vlc-devel] commit: Do not create empty title (avformat). (Laurent Aimar )

git version control git at videolan.org
Thu Feb 12 00:08:08 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Feb 12 00:07:20 2009 +0100| [371a27f5231037f884926195ee90d43dae3848f7] | committer: Laurent Aimar 

Do not create empty title (avformat).

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

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

diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 237c168..4017b77 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -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();




More information about the vlc-devel mailing list