video: Fix creation of grayscale caps
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 7 Apr 2011 08:06:53 +0000 (10:06 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 7 Apr 2011 08:06:53 +0000 (10:06 +0200)
The endianness was not set correctly before.

Fixes bug #646923.

gst-libs/gst/video/video.c

index a423a7e..a369387 100644 (file)
@@ -707,14 +707,14 @@ gst_video_format_new_caps_raw (GstVideoFormat format)
         break;
     }
 
-    if (bpp > 8) {
+    if (bpp <= 8) {
       caps = gst_caps_new_simple ("video/x-raw-gray",
           "bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, NULL);
     } else {
       caps = gst_caps_new_simple ("video/x-raw-gray",
           "bpp", G_TYPE_INT, bpp,
           "depth", G_TYPE_INT, depth,
-          "endianness", G_TYPE_INT, G_BIG_ENDIAN, NULL);
+          "endianness", G_TYPE_INT, endianness, NULL);
     }
 
     return caps;