mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
gl: Mark gst_gl_context_new_wrapped()
return value as nullable
If a GL context is requested for which no API support is compiled in then `NULL` is returned. Also remove a useless `NULL` check: `g_object_new()` can't possibly return `NULL`, ever. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3656>
This commit is contained in:
parent
b713c141e0
commit
19603248c2
1 changed files with 1 additions and 8 deletions
|
@ -402,7 +402,7 @@ gst_gl_context_new (GstGLDisplay * display)
|
||||||
*
|
*
|
||||||
* @available_apis must not be %GST_GL_API_NONE or %GST_GL_API_ANY
|
* @available_apis must not be %GST_GL_API_NONE or %GST_GL_API_ANY
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a #GstGLContext wrapping @handle
|
* Returns: (transfer full) (nullable): a #GstGLContext wrapping @handle
|
||||||
*
|
*
|
||||||
* Since: 1.4
|
* Since: 1.4
|
||||||
*/
|
*/
|
||||||
|
@ -431,13 +431,6 @@ gst_gl_context_new_wrapped (GstGLDisplay * display, guintptr handle,
|
||||||
context_wrap = g_object_new (GST_TYPE_GL_WRAPPED_CONTEXT, NULL);
|
context_wrap = g_object_new (GST_TYPE_GL_WRAPPED_CONTEXT, NULL);
|
||||||
gst_object_ref_sink (context_wrap);
|
gst_object_ref_sink (context_wrap);
|
||||||
|
|
||||||
if (!context_wrap) {
|
|
||||||
/* subclass returned a NULL context */
|
|
||||||
GST_ERROR ("Could not wrap existing context");
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
context = (GstGLContext *) context_wrap;
|
context = (GstGLContext *) context_wrap;
|
||||||
|
|
||||||
context->display = gst_object_ref (display);
|
context->display = gst_object_ref (display);
|
||||||
|
|
Loading…
Reference in a new issue