video: Fix creation of grayscale caps

The endianness was not set correctly before.

Fixes bug #646923.
This commit is contained in:
Sebastian Dröge 2011-04-07 10:06:53 +02:00
parent e284455272
commit a29e55f9c4

View 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;