[vlc-commits] Add title time in playback menus for MP4

Edward Wang git at videolan.org
Wed Dec 14 14:27:18 CET 2011


vlc | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Wed Dec 14 14:14:12 2011 +0100| [ce01d1fc4db418d39880bbb6300eeb5bbcd7ba65] | committer: Jean-Baptiste Kempf

Add title time in playback menus for MP4

Ref #4030

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

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

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index ee26870..e9acee3 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -1161,6 +1161,13 @@ static void LoadChapter( demux_t  *p_demux )
             }
         }
     }
+
+    /* Add duration if titles are enabled */
+    if( p_sys->p_title )
+    {
+        p_sys->p_title->i_length = (uint64_t)1000000 *
+                       (uint64_t)p_sys->i_duration / (uint64_t)p_sys->i_timescale;
+    }
 }
 
 /* now create basic chunk data, the rest will be filled by MP4_CreateSamplesIndex */



More information about the vlc-commits mailing list