[vlc-commits] scale: remove dead code

Rémi Denis-Courmont git at videolan.org
Wed Sep 14 10:27:20 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug 31 22:32:08 2016 +0300| [5652f673f6fc1cf2aa2e2b72da8252cfa0755559] | committer: Rémi Denis-Courmont

scale: remove dead code

Picture dimensions should never be zero, since most filters and outputs
will not deal with it.

If they were, this code would leak the picture pool in under a second
anyway.

This reverts commit e62911abc7df0de022a467f3e5b373f324cc4078.

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

 modules/video_filter/scale.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/modules/video_filter/scale.c b/modules/video_filter/scale.c
index b06b4f0..818aa28 100644
--- a/modules/video_filter/scale.c
+++ b/modules/video_filter/scale.c
@@ -90,14 +90,6 @@ 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;
-
     video_format_ScaleCropAr( &p_filter->fmt_out.video, &p_filter->fmt_in.video );
 
     /* Request output picture */



More information about the vlc-commits mailing list