From a29e55f9c4477e4c77218ca03536d3bbe3e6e518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 7 Apr 2011 10:06:53 +0200 Subject: [PATCH] video: Fix creation of grayscale caps The endianness was not set correctly before. Fixes bug #646923. --- gst-libs/gst/video/video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/video/video.c b/gst-libs/gst/video/video.c index a423a7e8b9..a369387802 100644 --- a/gst-libs/gst/video/video.c +++ b/gst-libs/gst/video/video.c @@ -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;