base: lookup RGB format without alpha
authorMarc Leeman <m.leeman@televic.com>
Tue, 14 Jun 2022 10:22:22 +0000 (12:22 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 9 Jul 2022 12:06:58 +0000 (12:06 +0000)
librfb requests a colour space for depth 32 and bpp 32 with alpha set to
0x0, treat this the same as depth 24 with bpp 32.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2627>

subprojects/gst-plugins-base/gst-libs/gst/video/video-format.c

index e033d38..77352ad 100644 (file)
@@ -7454,6 +7454,9 @@ gst_video_format_from_masks (gint depth, gint bpp, gint endianness,
   } else if (depth == 24 && bpp == 32) {
     format = gst_video_format_from_rgb32_masks (red_mask, green_mask,
         blue_mask);
+  } else if (depth == 32 && bpp == 32 && !alpha_mask) {
+    format = gst_video_format_from_rgb32_masks (red_mask, green_mask,
+        blue_mask);
   } else if (depth == 32 && bpp == 32 && alpha_mask) {
     format = gst_video_format_from_rgba32_masks (red_mask, green_mask,
         blue_mask, alpha_mask);