mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
glupload: fix transform_caps NULL pointer dereference
gst_gl_upload_transform_caps() is missing a NULL pointer check in case the current upload method's transform_caps returns a NULL pointer. In the following loop over all upload methods, NULL pointer return values are already handled correctly.
This commit is contained in:
parent
7849f22cb3
commit
dedd20f430
1 changed files with 12 additions and 9 deletions
|
@ -1797,16 +1797,19 @@ gst_gl_upload_transform_caps (GstGLUpload * upload, GstGLContext * context,
|
||||||
if (upload->priv->method) {
|
if (upload->priv->method) {
|
||||||
tmp = upload->priv->method->transform_caps (upload->priv->method_impl,
|
tmp = upload->priv->method->transform_caps (upload->priv->method_impl,
|
||||||
context, direction, caps);
|
context, direction, caps);
|
||||||
if (filter) {
|
if (tmp) {
|
||||||
result = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
|
if (filter) {
|
||||||
gst_caps_unref (tmp);
|
result =
|
||||||
} else {
|
gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
|
||||||
result = tmp;
|
gst_caps_unref (tmp);
|
||||||
|
} else {
|
||||||
|
result = tmp;
|
||||||
|
}
|
||||||
|
if (!gst_caps_is_empty (result))
|
||||||
|
return result;
|
||||||
|
else
|
||||||
|
gst_caps_unref (result);
|
||||||
}
|
}
|
||||||
if (!gst_caps_is_empty (result))
|
|
||||||
return result;
|
|
||||||
else
|
|
||||||
gst_caps_unref (result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = gst_caps_new_empty ();
|
tmp = gst_caps_new_empty ();
|
||||||
|
|
Loading…
Reference in a new issue