image: fix wrong check for rect bounds in copy_image().
authorWind Yuan <feng.yuan@intel.com>
Sat, 27 Apr 2013 07:15:49 +0000 (15:15 +0800)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 14 Jun 2013 11:50:47 +0000 (13:50 +0200)
gst-libs/gst/vaapi/gstvaapiimage.c

index 72c04ff..e08ae65 100644 (file)
@@ -923,9 +923,9 @@ copy_image(
 
     if (rect) {
         if (rect->x >= src_image->width ||
-            rect->x + src_image->width > src_image->width ||
+            rect->x + rect->width > src_image->width ||
             rect->y >= src_image->height ||
-            rect->y + src_image->height > src_image->height)
+            rect->y + rect->height > src_image->height)
             return FALSE;
     }
     else {