[vlc-commits] demux: mp4: fix mvhd duration debug string

Francois Cartegnie git at videolan.org
Wed Oct 7 15:46:24 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct  7 14:05:46 2015 +0200| [9b166a16e32a87616223b8627902efd51652b31d] | committer: Francois Cartegnie

demux: mp4: fix mvhd duration debug string

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

 modules/demux/mp4/libmp4.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 35b774d..0cc1b29 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -545,10 +545,9 @@ static int MP4_ReadBox_mvhd(  stream_t *p_stream, MP4_Box_t *p_box )
     MP4_ConvertDate2Str( s_creation_time, p_box->data.p_mvhd->i_creation_time, false );
     MP4_ConvertDate2Str( s_modification_time,
                          p_box->data.p_mvhd->i_modification_time, false );
-    if( p_box->data.p_mvhd->i_rate )
+    if( p_box->data.p_mvhd->i_rate && p_box->data.p_mvhd->i_timescale )
     {
-        MP4_ConvertDate2Str( s_duration,
-                 p_box->data.p_mvhd->i_duration / p_box->data.p_mvhd->i_rate, true );
+        MP4_ConvertDate2Str( s_duration, p_box->data.p_mvhd->i_duration / p_box->data.p_mvhd->i_timescale, true );
     }
     else
     {



More information about the vlc-commits mailing list