plugins: fix memory leak when GL context is created

When the GL display and context are created inside an VAAPI element
the created GL context is leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=773453
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-10-10 19:57:45 +02:00
parent ac31160dfc
commit 4866e4c452

View file

@ -1240,6 +1240,8 @@ gst_vaapi_plugin_base_create_gl_context (GstVaapiPluginBase * plugin)
} while (!gst_gl_display_add_context (gl_display, gl_context));
GST_OBJECT_UNLOCK (gl_display);
gst_object_replace (&plugin->gl_context, (GstObject *) gl_context);
return GST_OBJECT_CAST (gl_context);
/* ERRORS */