[vlc-devel] [PATCH] scale: remove dead code

RĂ©mi Denis-Courmont remi at remlab.net
Wed Aug 31 21:33:57 CEST 2016


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.
---
 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 */
-- 
2.9.3



More information about the vlc-devel mailing list