[vlc-commits] demux: avi: fix fpe (#19688)

Francois Cartegnie git at videolan.org
Fri Feb 23 18:50:05 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Feb 23 18:48:47 2018 +0100| [672f3587f672a321d1b2120791f21e0160250227] | committer: Francois Cartegnie

demux: avi: fix fpe (#19688)

(cherry picked from commit 51390d737c1dc116a730185bbc73df32f31ee13d)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=672f3587f672a321d1b2120791f21e0160250227
---

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

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 1b037b0d96..374b930269 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -1845,7 +1845,8 @@ static mtime_t AVI_GetDPTS( avi_track_t *tk, int64_t i_count )
     if( !tk->i_rate )
         return i_dpts;
 
-    i_dpts = AVI_Rescale( CLOCK_FREQ * i_count, tk->i_rate, tk->i_scale );
+    if( tk->i_scale )
+        i_dpts = AVI_Rescale( CLOCK_FREQ * i_count, tk->i_rate, tk->i_scale );
 
     if( tk->i_samplesize )
     {



More information about the vlc-commits mailing list