video: Use host endianness when generating caps for 16-bit rgb formats

This is necessary in order to match what the caps strings in
video.h contain for 16-bit rgb formats and also to match how
gst_video_format_parse_caps expects them.

https://bugzilla.gnome.org/show_bug.cgi?id=667681
This commit is contained in:
George Kiagiadakis 2012-01-10 21:02:48 +02:00 committed by Vincent Penquerc'h
parent bf82cc10c5
commit 1251fb3fc0

View file

@ -673,7 +673,7 @@ gst_video_format_new_caps_raw (GstVideoFormat format)
if (bpp != 8) {
gst_caps_set_simple (caps,
"endianness", G_TYPE_INT, G_BIG_ENDIAN,
"endianness", G_TYPE_INT, bpp == 16 ? G_BYTE_ORDER : G_BIG_ENDIAN,
"red_mask", G_TYPE_INT, red_mask,
"green_mask", G_TYPE_INT, green_mask,
"blue_mask", G_TYPE_INT, blue_mask, NULL);