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

Francois Cartegnie git at videolan.org
Wed Oct 21 19:19:54 CEST 2015


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct  7 14:05:46 2015 +0200| [a6cf2376d27132e567f7263c0b6931609e6a60ab] | committer: Jean-Baptiste Kempf

demux: mp4: fix mvhd duration debug string

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

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

 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 d4891d4..d05abe6 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -378,10 +378,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