mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
vaapiupload: fix sink caps to report the supported set of YUV caps.
Try to allocate the GstVaapiUploader helper object prior to listing the supported image formats. Otherwise, only a single generic caps is output with no particular pixel format referenced in there.
This commit is contained in:
parent
c2a610735f
commit
237a4adb0c
1 changed files with 2 additions and 3 deletions
|
@ -350,13 +350,12 @@ gst_vaapiupload_transform_caps(
|
||||||
if (!gst_structure_has_name(structure, GST_VAAPI_SURFACE_CAPS_NAME))
|
if (!gst_structure_has_name(structure, GST_VAAPI_SURFACE_CAPS_NAME))
|
||||||
return NULL;
|
return NULL;
|
||||||
out_caps = gst_caps_from_string(gst_vaapiupload_yuv_caps_str);
|
out_caps = gst_caps_from_string(gst_vaapiupload_yuv_caps_str);
|
||||||
if (upload->display) {
|
if (gst_vaapiupload_ensure_uploader(upload)) {
|
||||||
GstCaps *allowed_caps, *inter_caps;
|
GstCaps *allowed_caps, *inter_caps;
|
||||||
allowed_caps = gst_vaapi_display_get_image_caps(upload->display);
|
allowed_caps = gst_vaapi_uploader_get_caps(upload->uploader);
|
||||||
if (!allowed_caps)
|
if (!allowed_caps)
|
||||||
return NULL;
|
return NULL;
|
||||||
inter_caps = gst_caps_intersect(out_caps, allowed_caps);
|
inter_caps = gst_caps_intersect(out_caps, allowed_caps);
|
||||||
gst_caps_unref(allowed_caps);
|
|
||||||
gst_caps_unref(out_caps);
|
gst_caps_unref(out_caps);
|
||||||
out_caps = inter_caps;
|
out_caps = inter_caps;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue