diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2015-08-26 15:40:16 +0530 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-08-26 15:03:05 +0300 |
commit | 9b59bb8630c8574da2a3b0db9c5cc530e7daa535 (patch) | |
tree | f10729a7b4be7e1ad12bde3c4a749da46ad46f0a /tests | |
parent | 54c2620bdb256022cdd11dd6639ca91cb982ffe2 (diff) | |
download | gstreamer-plugins-bad-9b59bb8630c8574da2a3b0db9c5cc530e7daa535.tar.gz |
compositor: Actually use the output resolution for clamping
The obscured check in compositor was using the dimensions of the pad to clamp
the h/w of the pad instead of the output resolution, and was doing an incorrect
calculation to do so. Fix that by simplifying the whole calculation by using
corner coordinates. Also add a test for this bug which fell through the cracks,
and just skip all the obscured tests if the pad's alpha is 0.0.
https://bugzilla.gnome.org/show_bug.cgi?id=754107
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/elements/compositor.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/check/elements/compositor.c b/tests/check/elements/compositor.c index a949d3828..dc1a58f03 100644 --- a/tests/check/elements/compositor.c +++ b/tests/check/elements/compositor.c @@ -1315,6 +1315,17 @@ GST_START_TEST (test_obscured_skipped) xpos0 = ypos0 = xpos1 = ypos1 = 0; buffer_mapped = FALSE; + xpos1 = ypos1 = 0; + xpos0 = ypos0 = width0 = height0 = width1 = height1 = 10; + out_width = out_height = 20; + GST_INFO ("testing bug 754107"); + _test_obscured (caps_str, xpos0, ypos0, width0, height0, alpha0, xpos1, ypos1, + width1, height1, alpha1, out_width, out_height); + fail_unless (buffer_mapped == TRUE); + xpos0 = ypos0 = xpos1 = ypos1 = width0 = height0 = width1 = height1 = 0; + out_width = out_height = 0; + buffer_mapped = FALSE; + xpos0 = ypos0 = 10000; out_width = 320; out_height = 240; |