glupload: Only add texture-target field to GL caps
So far we simply ignored it for MEMORY_DMABUF passthrough caps without known negative cosequences, but with upcoming more complicated caps negotiations it's becoming an issue, thus fix it. Fixes: 7e71d4f753 ("gl: upload: Add DMA_DRM passthrough upload") Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8964>
This commit is contained in:
parent
818feea0b5
commit
c03a5b0c1b
@ -3430,14 +3430,22 @@ gst_gl_upload_fixate_caps (GstGLUpload * upload, GstPadDirection direction,
|
|||||||
|
|
||||||
/* If the target is found, fixate the other fields */
|
/* If the target is found, fixate the other fields */
|
||||||
if (i < n) {
|
if (i < n) {
|
||||||
|
GstCapsFeatures *features;
|
||||||
|
|
||||||
|
features = gst_caps_get_features (othercaps, i);
|
||||||
|
|
||||||
ret_caps = gst_caps_new_empty ();
|
ret_caps = gst_caps_new_empty ();
|
||||||
gst_caps_append_structure_full (ret_caps,
|
gst_caps_append_structure_full (ret_caps,
|
||||||
gst_structure_copy (gst_caps_get_structure (othercaps, i)),
|
gst_structure_copy (gst_caps_get_structure (othercaps, i)),
|
||||||
gst_caps_features_copy (gst_caps_get_features (othercaps, i)));
|
gst_caps_features_copy (features));
|
||||||
|
|
||||||
ret_caps = gst_caps_fixate (ret_caps);
|
ret_caps = gst_caps_fixate (ret_caps);
|
||||||
gst_caps_set_simple (ret_caps, "texture-target", G_TYPE_STRING,
|
|
||||||
gst_gl_texture_target_to_string (target), NULL);
|
if (gst_caps_features_contains (features,
|
||||||
|
GST_CAPS_FEATURE_MEMORY_GL_MEMORY)) {
|
||||||
|
gst_caps_set_simple (ret_caps, "texture-target", G_TYPE_STRING,
|
||||||
|
gst_gl_texture_target_to_string (target), NULL);
|
||||||
|
}
|
||||||
|
|
||||||
gst_caps_unref (othercaps);
|
gst_caps_unref (othercaps);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user