vlc/vlc-1.2 | branch: master | Edward Wang <[email protected]> | 
Thu Dec 15 02:13:14 2011 +0100| [e463dc2a067785727cc8840328cfb7721a239798] | 
committer: Jean-Baptiste Kempf

Support duration in avformat demuxer

Ref #4030

Signed-off-by: Jean-Baptiste Kempf <[email protected]>
(cherry picked from commit dbd651614f0e5bfb4f5d9c9cc629a361183a2713)

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

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

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

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to