[vlc-commits] demux: mp4: avoid overflow

Francois Cartegnie git at videolan.org
Tue May 27 23:08:51 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue May 27 21:23:24 2014 +0200| [105797f1e34100d3ad74cb6ef92aecc97058501a] | committer: Francois Cartegnie

demux: mp4: avoid overflow

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

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

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 6ce09b0..71d2d8e 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -1919,9 +1919,9 @@ static void TrackGetESSampleRate( demux_t *p_demux,
     if ( p_mdhd )
     {
         vlc_ureduce( pi_num, pi_den,
-                     BOXDATA(p_mdhd)->i_timescale * p_track->i_sample_count,
-                     BOXDATA(p_mdhd)->i_duration,
-                     UINT16_MAX);
+                     (uint64_t) BOXDATA(p_mdhd)->i_timescale * p_track->i_sample_count,
+                     (uint64_t) BOXDATA(p_mdhd)->i_duration,
+                     UINT16_MAX );
         return;
     }
 



More information about the vlc-commits mailing list