changeset 30203:3888e3862fe0

vf crop: do not generate 0-size slices, they are pointless and also confuse libswscale to assume the wrong slice order.
author reimar
date Fri, 08 Jan 2010 19:21:14 +0000
parents 96e5d03cda1d
children 2b19714f79d2
files libmpcodecs/vf_crop.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_crop.c	Fri Jan 08 18:56:39 2010 +0000
+++ b/libmpcodecs/vf_crop.c	Fri Jan 08 19:21:14 2010 +0000
@@ -132,7 +132,7 @@
     if (x+w > vf->priv->crop_w) w = vf->priv->crop_w-x;
     if (y+h > vf->priv->crop_h) h = vf->priv->crop_h-y;
     //mp_msg(MSGT_VFILTER, MSGL_V, "%d %d %d %d\n", w,h,x,y);
-    if ((w < 0) || (h < 0)) return;
+    if (w <= 0 || h <= 0) return;
     vf_next_draw_slice(vf,src2,stride,w,h,x,y);
 }