]> git.sesse.net Git - vlc/commitdiff
Support duration in avformat demuxer
authorEdward Wang <edward.c.wang@compdigitec.com>
Thu, 15 Dec 2011 01:13:14 +0000 (02:13 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 15 Dec 2011 01:13:14 +0000 (02:13 +0100)
Ref #4030

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/avformat/demux.c

index ce87eb4140176aeb2b6b1129dc2959f9ee1b586d..f35d0e5d7a6c5cfa9167a803ca7e4e3ac57e217f 100644 (file)
@@ -478,7 +478,11 @@ int OpenDemux( vlc_object_t *p_this )
              p_sys->ic->duration * 1000000 / AV_TIME_BASE : -1 );
 
     if( p_sys->ic->nb_chapters > 0 )
+    {
         p_sys->p_title = vlc_input_title_New();
+        p_sys->p_title->i_length = p_sys->ic->duration * 1000000 / AV_TIME_BASE;
+    }
+
     for( i = 0; i < p_sys->ic->nb_chapters; i++ )
     {
         seekpoint_t *s = vlc_seekpoint_New();