[vlc-commits] demux: avi: reject 0 scaled tracks

Francois Cartegnie git at videolan.org
Tue Mar 6 14:31:04 CET 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Mar  6 14:28:05 2018 +0100| [b2d52c22b9018d361c43b24f4edcd307c611af55] | committer: Francois Cartegnie

demux: avi: reject 0 scaled tracks

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

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

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 55a32e0f35..8913c45e29 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -462,7 +462,7 @@ static int Open( vlc_object_t * p_this )
         tk->i_samplesize = p_strh->i_samplesize;
         msg_Dbg( p_demux, "stream[%u] rate:%u scale:%u samplesize:%u",
                 i, tk->i_rate, tk->i_scale, tk->i_samplesize );
-        if( tk->i_scale > tk->i_rate )
+        if( tk->i_scale > tk->i_rate || !tk->i_scale || !tk->i_rate )
         {
             free( tk );
             continue;



More information about the vlc-commits mailing list