]> git.sesse.net Git - vlc/commitdiff
Don't scale when source or destination width/height is zero. Fixes a arithmic excepti...
authorJean-Paul Saman <jpsaman@videolan.org>
Thu, 19 Jul 2007 13:45:30 +0000 (13:45 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Thu, 19 Jul 2007 13:45:30 +0000 (13:45 +0000)
modules/video_filter/scale.c

index 9b62aa9d65032b2613fdf810377fa1aed19bbba1..4b7306ffe099fc47db2415eb022aef8c32d77def 100644 (file)
@@ -114,6 +114,14 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
 
     if( !p_pic ) return NULL;
 
+    if( (p_filter->fmt_in.video.i_height == 0) ||
+        (p_filter->fmt_in.video.i_width == 0) )
+        return NULL;
+
+    if( (p_filter->fmt_out.video.i_height == 0) ||
+        (p_filter->fmt_out.video.i_width == 0) )
+        return NULL;
+
     /* Request output picture */
     p_pic_dst = p_filter->pf_vout_buffer_new( p_filter );
     if( !p_pic_dst )