videoconvert: Compare y offset with height, not width, when testing for overlap
authorDouglas Bagnall <douglas@paradise.net.nz>
Thu, 1 Nov 2012 21:53:57 +0000 (10:53 +1300)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 2 Nov 2012 08:29:30 +0000 (09:29 +0100)
This could have prevented images showing that should have when the
source height is greater than its width.

When width exceeds height, as is common, it probably only caused a
miniscule amount of unnecessary work.  I haven't tested.

gst/videomixer/blend.c

index 9d52e20..66461f2 100644 (file)
@@ -273,7 +273,7 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
     ypos = 0; \
   } \
   /* If x or y offset are larger then the source it's outside of the picture */ \
-  if (xoffset > src_width || yoffset > src_width) { \
+  if (xoffset > src_width || yoffset > src_height) { \
     return; \
   } \
   \
@@ -518,7 +518,7 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
     ypos = 0; \
   } \
   /* If x or y offset are larger then the source it's outside of the picture */ \
-  if (xoffset > src_width || yoffset > src_width) { \
+  if (xoffset > src_width || yoffset > src_height) { \
     return; \
   } \
   \