mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
glbasefilter: avoid segfault when gl platform is not available
https://bugzilla.gnome.org/show_bug.cgi?id=747124
This commit is contained in:
parent
af77f6467f
commit
c45072ae86
1 changed files with 9 additions and 0 deletions
|
@ -342,6 +342,9 @@ gst_gl_base_filter_decide_allocation (GstBaseTransform * trans,
|
||||||
gst_gl_display_get_gl_context_for_thread (filter->display, NULL);
|
gst_gl_display_get_gl_context_for_thread (filter->display, NULL);
|
||||||
if (!filter->context) {
|
if (!filter->context) {
|
||||||
filter->context = gst_gl_context_new (filter->display);
|
filter->context = gst_gl_context_new (filter->display);
|
||||||
|
if (!filter->context)
|
||||||
|
goto context_null_error;
|
||||||
|
|
||||||
if (!gst_gl_context_create (filter->context,
|
if (!gst_gl_context_create (filter->context,
|
||||||
filter->priv->other_context, &error))
|
filter->priv->other_context, &error))
|
||||||
goto context_error;
|
goto context_error;
|
||||||
|
@ -362,6 +365,12 @@ context_error:
|
||||||
(NULL));
|
(NULL));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
context_null_error:
|
||||||
|
{
|
||||||
|
GST_ELEMENT_ERROR (trans, RESOURCE, FAILED,
|
||||||
|
("Failed to create context."), (NULL));
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
error:
|
error:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (trans, LIBRARY, INIT,
|
GST_ELEMENT_ERROR (trans, LIBRARY, INIT,
|
||||||
|
|
Loading…
Reference in a new issue