From fab97aec53be99675a2f5145e0a399bc34d4ea4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 7 Apr 2010 17:25:23 +0200 Subject: [PATCH] video: Fix parsing of 8-bit grayscale caps --- gst-libs/gst/video/video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/video.c b/gst-libs/gst/video/video.c index aa3d3c8367..2041a47b90 100644 --- a/gst-libs/gst/video/video.c +++ b/gst-libs/gst/video/video.c @@ -411,7 +411,9 @@ gst_video_format_parse_caps (GstCaps * caps, GstVideoFormat * format, ok &= gst_structure_get_int (structure, "depth", &depth); ok &= gst_structure_get_int (structure, "bpp", &bpp); - ok &= gst_structure_get_int (structure, "endianness", &endianness); + + if (bpp > 8) + ok &= gst_structure_get_int (structure, "endianness", &endianness); if (depth == 8 && bpp == 8) { *format = GST_VIDEO_FORMAT_GRAY8;