summaryrefslogtreecommitdiff
path: root/sys/ximage/ximagesink.c
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2014-03-27 16:43:10 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2014-03-27 16:47:30 -0400
commitf270b267c530ccc85718b37df74a9b01f3e4bca3 (patch)
tree0689fa444b71d685f2b604e9078ba0a74d1f91bc /sys/ximage/ximagesink.c
parent0348ee66f1cb7149f0d57ab4f63dbb6dfb41f010 (diff)
ximagesink: only extrapolate alpha mask for 32-bit depth
Instead of passing bogus alpha mask values when there's no alpha. https://bugzilla.gnome.org/show_bug.cgi?id=727188
Diffstat (limited to 'sys/ximage/ximagesink.c')
-rw-r--r--sys/ximage/ximagesink.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index 867830efb..ff6a9d60b 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -906,9 +906,12 @@ gst_ximagesink_xcontext_get (GstXImageSink * ximagesink)
}
/* extrapolate alpha mask */
- alpha_mask = ~(xcontext->visual->red_mask
- | xcontext->visual->green_mask | xcontext->visual->blue_mask);
- alpha_mask &= 0xffffffff;
+ if (xcontext->depth == 32) {
+ alpha_mask = ~(xcontext->visual->red_mask
+ | xcontext->visual->green_mask | xcontext->visual->blue_mask);
+ } else {
+ alpha_mask = 0;
+ }
vformat =
gst_video_format_from_masks (xcontext->depth, xcontext->bpp, endianness,