mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
va: caps: bail raw caps if driver doesn't report surface formats
This is a bug in Gallium RadeonSI driver for Polaris10, which doesn't report sufrace formats for reported chroma. If one chroma doesn't report surface formats, skip the generated caps. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1483>
This commit is contained in:
parent
d3ef3d562a
commit
5154ee7f4c
1 changed files with 9 additions and 0 deletions
|
@ -186,6 +186,13 @@ gst_va_create_raw_caps_from_config (GstVaDisplay * display, VAConfigID config)
|
|||
}
|
||||
}
|
||||
|
||||
/* if driver doesn't report surface formats for current
|
||||
* chroma. Gallium AMD bug for 4:2:2 */
|
||||
if (formats->len == 0) {
|
||||
caps = NULL;
|
||||
goto bail;
|
||||
}
|
||||
|
||||
base_caps = gst_caps_new_simple ("video/x-raw", "width", GST_TYPE_INT_RANGE,
|
||||
min_width, max_width, "height", GST_TYPE_INT_RANGE, min_height,
|
||||
max_height, NULL);
|
||||
|
@ -256,6 +263,8 @@ gst_va_create_raw_caps_from_config (GstVaDisplay * display, VAConfigID config)
|
|||
}
|
||||
|
||||
gst_caps_unref (base_caps);
|
||||
|
||||
bail:
|
||||
g_array_unref (formats);
|
||||
g_free (attribs);
|
||||
|
||||
|
|
Loading…
Reference in a new issue