diff mbox

video: fix gst_video_format_from_masks() for little endian masks with alpha

Message ID CA+M3ks7CNF6Rd_EwSscquHbEcuyJmO2f015i1tj_o_tjYXoPyA@mail.gmail.com
State Accepted
Headers show

Commit Message

Benjamin Gaignard May 17, 2013, 8:47 a.m. UTC
commit 5da2bd3216cd067e720386b791509bf2f5222a1a
Author: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Date:   Thu May 16 10:52:29 2013 +0200

    video: fix gst_video_format_from_masks() for little endian masks with
alpha

    Need to byte-order swap the alpha mask as well in this case.

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

       red_mask >>= 8;
diff mbox

Patch

diff --git a/gst-libs/gst/video/video-format.c
b/gst-libs/gst/video/video-format.c
index 592aa38..7fd60cf 100644
--- a/gst-libs/gst/video/video-format.c
+++ b/gst-libs/gst/video/video-format.c
@@ -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) {