cudamemorycopy: Make sure writable caps before removing fields

The caps to be modified may not be writable when D3D11/GL/NVMM
are all disabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2664>
This commit is contained in:
Seungha Yang 2022-06-27 19:58:58 +09:00
parent c895cdbec8
commit 16955ba672

View file

@ -224,6 +224,7 @@ create_transform_caps (GstCaps * caps, gboolean to_cuda)
GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY);
ret = gst_caps_merge (ret, new_caps);
ret = gst_caps_make_writable (ret);
_remove_field (ret, "texture-target");
gst_caps_unref (sys_caps);
@ -252,6 +253,7 @@ create_transform_caps (GstCaps * caps, gboolean to_cuda)
new_caps = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY);
ret = gst_caps_merge (ret, new_caps);
ret = gst_caps_make_writable (ret);
_remove_field (ret, "texture-target");
}