mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
[887/906] mixer: fixup a memory leak of the context in the GLTextureUploadMeta path
gst_structure_get returns a reference to the object and we asked for another with gst_object_replace. https://bugzilla.gnome.org/show_bug.cgi?id=724816
This commit is contained in:
parent
3c9f5e6e5e
commit
1e5851fa00
1 changed files with 7 additions and 2 deletions
|
@ -1069,8 +1069,13 @@ gst_gl_mixer_decide_allocation (GstGLMixer * mix, GstQuery * query)
|
|||
|
||||
gst_query_parse_nth_allocation_meta (query, idx, &upload_meta_params);
|
||||
if (gst_structure_get (upload_meta_params, "gst.gl.GstGLContext",
|
||||
GST_GL_TYPE_CONTEXT, &context, NULL) && context)
|
||||
gst_object_replace ((GstObject **) & mix->context, (GstObject *) context);
|
||||
GST_GL_TYPE_CONTEXT, &context, NULL) && context) {
|
||||
GstGLContext *old = mix->context;
|
||||
|
||||
mix->context = context;
|
||||
if (old)
|
||||
gst_object_unref (old);
|
||||
}
|
||||
}
|
||||
|
||||
if (!mix->context) {
|
||||
|
|
Loading…
Reference in a new issue