[vlc-commits] demux: mp4: fix integer overflow (fix #12074)

Francois Cartegnie git at videolan.org
Thu Sep 4 05:03:08 CEST 2014


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Sep  3 14:15:49 2014 +0200| [5ddc9ee3a25652bd65910bb5a6db05bac3393105] | committer: Jean-Baptiste Kempf

demux: mp4: fix integer overflow (fix #12074)

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

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

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

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index dc45952..824b575 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -967,13 +967,14 @@ end:
                 continue;
 
             mtime_t i_dts = MP4_TrackGetDTS( p_demux, tk );
+            p_sys->i_pcr = __MIN( i_dts, p_sys->i_pcr );
+
             if ( !p_sys->b_seekmode && i_dts > p_sys->i_pcr + 2*CLOCK_FREQ )
             {
                 msg_Dbg( p_demux, "that media doesn't look interleaved, will need to seek");
                 p_sys->b_seekmode = true;
             }
 
-            p_sys->i_pcr = __MIN( i_dts, p_sys->i_pcr );
             p_sys->i_time = p_sys->i_pcr * p_sys->i_timescale / CLOCK_FREQ;
         }
     }



More information about the vlc-commits mailing list