gl: upload: use empty caps if transform_caps returns NULL

transform_caps() from the upload methods can return NULL in some cases, so fall
back to empty caps in that case.

This can happen if "Raw Data" is the currently selected method and new caps with
memory:DMABuf caps feature are negotiated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8514>
This commit is contained in:
Michael Olbrich 2025-02-19 09:32:43 +01:00 committed by GStreamer Marge Bot
parent 368492ba88
commit 8d42a7e233

View File

@ -3092,6 +3092,8 @@ gst_gl_upload_transform_caps (GstGLUpload * upload, GstGLContext * context,
if (upload->priv->method) {
tmp = upload->priv->method->transform_caps (upload->priv->method_impl,
context, direction, caps);
if (!tmp)
tmp = gst_caps_new_empty ();
} else {
tmp = gst_caps_new_empty ();
}