mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
glcolorconvert: fix negotiation for a non list video format in caps
For a single format in the caps, we were returning some weird answers,
like only RGB formats for a RGB input when we can also support YUV from
RGB.
Fixup of 3cfff727b1
where I thought my
previous (~6month) self had got this right. Don't trust your previous
self people!
This commit is contained in:
parent
4187242a7c
commit
e367d3e812
1 changed files with 2 additions and 3 deletions
|
@ -995,7 +995,6 @@ gst_gl_color_convert_caps_transform_format_info (GstGLContext * context,
|
||||||
if (have_rgb_formats) {
|
if (have_rgb_formats) {
|
||||||
gst_structure_set_value (st, "format", &supported_formats);
|
gst_structure_set_value (st, "format", &supported_formats);
|
||||||
} else {
|
} else {
|
||||||
GValue supported_rgb_formats = G_VALUE_INIT;
|
|
||||||
/* add passthrough structure, then the rgb conversion structure */
|
/* add passthrough structure, then the rgb conversion structure */
|
||||||
gst_structure_set_value (st, "format", &passthrough_formats);
|
gst_structure_set_value (st, "format", &passthrough_formats);
|
||||||
gst_caps_append_structure_full (res, gst_structure_copy (st),
|
gst_caps_append_structure_full (res, gst_structure_copy (st),
|
||||||
|
@ -1013,9 +1012,9 @@ gst_gl_color_convert_caps_transform_format_info (GstGLContext * context,
|
||||||
gst_structure_set_value (st, "format", format);
|
gst_structure_set_value (st, "format", format);
|
||||||
gst_caps_append_structure_full (res, gst_structure_copy (st),
|
gst_caps_append_structure_full (res, gst_structure_copy (st),
|
||||||
gst_caps_features_copy (f));
|
gst_caps_features_copy (f));
|
||||||
gst_structure_set_value (st, "format", &rgb_formats);
|
|
||||||
} else { /* RGB */
|
|
||||||
gst_structure_set_value (st, "format", &supported_rgb_formats);
|
gst_structure_set_value (st, "format", &supported_rgb_formats);
|
||||||
|
} else { /* RGB */
|
||||||
|
gst_structure_set_value (st, "format", &supported_formats);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gst_structure_remove_fields (st, "colorimetry", "chroma-site",
|
gst_structure_remove_fields (st, "colorimetry", "chroma-site",
|
||||||
|
|
Loading…
Reference in a new issue