mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 08:54:05 +00:00
winegstreamer: Remove colorimetry and chroma-site from wg_format caps.
They are set by default and will force color conversions we may not want in the wg_transform videoconvert.
This commit is contained in:
parent
41f07a8a0f
commit
59dedf2754
|
@ -480,12 +480,17 @@ static GstCaps *wg_format_to_caps_video(const struct wg_format *format)
|
|||
{
|
||||
for (i = 0; i < gst_caps_get_size(caps); ++i)
|
||||
{
|
||||
GstStructure *structure = gst_caps_get_structure(caps, i);
|
||||
|
||||
if (!format->u.video.width)
|
||||
gst_structure_remove_fields(gst_caps_get_structure(caps, i), "width", NULL);
|
||||
gst_structure_remove_fields(structure, "width", NULL);
|
||||
if (!format->u.video.height)
|
||||
gst_structure_remove_fields(gst_caps_get_structure(caps, i), "height", NULL);
|
||||
gst_structure_remove_fields(structure, "height", NULL);
|
||||
if (!format->u.video.fps_d && !format->u.video.fps_n)
|
||||
gst_structure_remove_fields(gst_caps_get_structure(caps, i), "framerate", NULL);
|
||||
gst_structure_remove_fields(structure, "framerate", NULL);
|
||||
|
||||
/* Remove fields which we don't specify but might have some default value */
|
||||
gst_structure_remove_fields(structure, "colorimetry", "chroma-site", NULL);
|
||||
}
|
||||
}
|
||||
return caps;
|
||||
|
|
|
@ -721,7 +721,7 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
|
|||
/* Clear some fields that shouldn't prevent us from connecting. */
|
||||
for (i = 0; i < gst_caps_get_size(caps); ++i)
|
||||
gst_structure_remove_fields(gst_caps_get_structure(caps, i),
|
||||
"framerate", "pixel-aspect-ratio", "colorimetry", "chroma-site", NULL);
|
||||
"framerate", "pixel-aspect-ratio", NULL);
|
||||
|
||||
str = gst_caps_to_string(caps);
|
||||
GST_LOG("Stream caps are \"%s\".", str);
|
||||
|
|
Loading…
Reference in a new issue