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

Edward Wang git at videolan.org
Wed Dec 14 23:20:30 CET 2011


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

Add title time in playback menus for MP4

Ref #4030

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit ce01d1fc4db418d39880bbb6300eeb5bbcd7ba65)

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

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

 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