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
This commit is contained in:
Nicolas Dufresne 2014-03-27 16:43:10 -04:00
parent 0348ee66f1
commit f270b267c5

View file

@ -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,