glcolorconvert: support RGB16/BGR16 video format download
authorWang Xin-yu (王昕宇) <comicfans44@gmail.com>
Thu, 27 Nov 2014 02:48:43 +0000 (10:48 +0800)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 27 Nov 2014 09:08:11 +0000 (10:08 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=740801

gst-libs/gst/gl/gstglcolorconvert.c

index 7c88c64..290949d 100644 (file)
@@ -656,6 +656,12 @@ _RGB_pixel_order (const gchar * expected, const gchar * wanted)
     g_free (temp);
   }
 
+  if (strcmp (want, "rgb16") == 0 || strcmp (want, "bgr16") == 0) {
+    gchar *temp = want;
+    want = g_strndup (temp, 3);
+    g_free (temp);
+  }
+
   /* pad want with 'a's */
   if ((len = strlen (want)) < 4) {
     gchar *new_want = g_strndup (want, 4);