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

Francois Cartegnie git at videolan.org
Fri Feb 23 18:49:30 CET 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Feb 23 18:48:47 2018 +0100| [51390d737c1dc116a730185bbc73df32f31ee13d] | committer: Francois Cartegnie

demux: avi: fix fpe (#19688)

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

 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 1549fe4ff4..8d98410339 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -1847,7 +1847,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