mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
gl: Fix GError leaks during failures
https://bugzilla.gnome.org/show_bug.cgi?id=755140
This commit is contained in:
parent
0cb160a685
commit
00438fdff0
7 changed files with 8 additions and 2 deletions
|
@ -496,6 +496,7 @@ context_error:
|
|||
{
|
||||
GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND, ("%s", error->message),
|
||||
(NULL));
|
||||
g_clear_error (&error);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -587,6 +587,7 @@ context_error:
|
|||
{
|
||||
GST_ELEMENT_ERROR (self, RESOURCE, NOT_FOUND, ("%s", error->message),
|
||||
(NULL));
|
||||
g_clear_error (&error);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -853,6 +853,7 @@ context_error:
|
|||
{
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, ("%s", error->message),
|
||||
(NULL));
|
||||
g_clear_error (&error);
|
||||
if (src->context)
|
||||
gst_object_unref (src->context);
|
||||
src->context = NULL;
|
||||
|
|
|
@ -460,6 +460,7 @@ _get_gl_context (GtkGstGLWidget * gst_widget)
|
|||
|
||||
GST_ERROR_OBJECT (gst_widget, "Error creating GdkGLContext : %s",
|
||||
error ? error->message : "No error set by Gdk");
|
||||
g_clear_error (&error);
|
||||
g_assert_not_reached ();
|
||||
return;
|
||||
}
|
||||
|
@ -501,6 +502,7 @@ _get_gl_context (GtkGstGLWidget * gst_widget)
|
|||
gst_gl_context_activate (priv->other_context, TRUE);
|
||||
if (!gst_gl_context_fill_info (priv->other_context, &error)) {
|
||||
GST_ERROR ("failed to retrieve gdk context info: %s", error->message);
|
||||
g_clear_error (&error);
|
||||
g_object_unref (priv->other_context);
|
||||
priv->other_context = NULL;
|
||||
} else {
|
||||
|
|
|
@ -110,6 +110,7 @@ _mem_create_gl (GstGLContext * context, struct create_data *transfer)
|
|||
|
||||
GST_CAT_ERROR (GST_CAT_GL_BASE_BUFFER, "Failed to create GL buffer: %s",
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -368,6 +368,7 @@ context_error:
|
|||
{
|
||||
GST_ELEMENT_ERROR (trans, RESOURCE, NOT_FOUND, ("%s", error->message),
|
||||
(NULL));
|
||||
g_clear_error (&error);
|
||||
return FALSE;
|
||||
}
|
||||
error:
|
||||
|
|
|
@ -178,7 +178,6 @@ gst_gl_filter_gl_start (GstGLBaseFilter * base_filter)
|
|||
GstGLFilterClass *filter_class = GST_GL_FILTER_GET_CLASS (filter);
|
||||
GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
|
||||
gint out_width, out_height;
|
||||
GError *error = NULL;
|
||||
|
||||
out_width = GST_VIDEO_INFO_WIDTH (&filter->out_info);
|
||||
out_height = GST_VIDEO_INFO_HEIGHT (&filter->out_info);
|
||||
|
@ -205,7 +204,7 @@ gst_gl_filter_gl_start (GstGLBaseFilter * base_filter)
|
|||
|
||||
context_error:
|
||||
{
|
||||
GST_ELEMENT_ERROR (filter, RESOURCE, NOT_FOUND, ("%s", error->message),
|
||||
GST_ELEMENT_ERROR (filter, RESOURCE, NOT_FOUND, ("Could not generate FBO"),
|
||||
(NULL));
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue