video: fix gst_video_format_from_masks() for little endian masks with alpha
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>
Thu, 16 May 2013 08:52:29 +0000 (10:52 +0200)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 16 May 2013 09:36:20 +0000 (10:36 +0100)
Need to byte-order swap the alpha mask as well in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=700413

gst-libs/gst/video/video-format.c

index 592aa38..7fd60cf 100644 (file)
@@ -2165,6 +2165,7 @@ gst_video_format_from_masks (gint depth, gint bpp, gint endianness,
     red_mask = GUINT32_TO_BE (red_mask);
     green_mask = GUINT32_TO_BE (green_mask);
     blue_mask = GUINT32_TO_BE (blue_mask);
+    alpha_mask = GUINT32_TO_BE (alpha_mask);
     endianness = G_BIG_ENDIAN;
     if (bpp == 24) {
       red_mask >>= 8;