mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
[685/906] filter: improve error handling
This commit is contained in:
parent
a9b5bfe9d7
commit
01518880fa
1 changed files with 10 additions and 2 deletions
|
@ -728,14 +728,17 @@ gst_gl_filter_set_caps (GstBaseTransform * bt, GstCaps * incaps,
|
||||||
gst_gl_display_thread_add (filter->display, gst_gl_filter_start_gl, filter);
|
gst_gl_display_thread_add (filter->display, gst_gl_filter_start_gl, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!filter->display->isAlive)
|
||||||
|
goto error;
|
||||||
|
|
||||||
if (filter_class->onInitFBO) {
|
if (filter_class->onInitFBO) {
|
||||||
if (!filter_class->onInitFBO (filter))
|
if (!filter_class->onInitFBO (filter))
|
||||||
goto display_error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filter_class->set_caps) {
|
if (filter_class->set_caps) {
|
||||||
if (!filter_class->set_caps (filter, incaps, outcaps))
|
if (!filter_class->set_caps (filter, incaps, outcaps))
|
||||||
goto display_error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_DEBUG ("set_caps %dx%d", GST_VIDEO_INFO_WIDTH (&filter->out_info),
|
GST_DEBUG ("set_caps %dx%d", GST_VIDEO_INFO_WIDTH (&filter->out_info),
|
||||||
|
@ -756,6 +759,11 @@ display_error:
|
||||||
GST_GL_DISPLAY_ERR_MSG (filter->display), (NULL));
|
GST_GL_DISPLAY_ERR_MSG (filter->display), (NULL));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error:
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue