mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
gl: don't take an extra ref on the display on set_context
gst_context_get_gl_display() returns a ref. Don't take another in gst_object_replace().
This commit is contained in:
parent
30ddb384ab
commit
cb4fd36e7e
1 changed files with 5 additions and 2 deletions
|
@ -767,8 +767,11 @@ gst_gl_handle_set_context (GstElement * element, GstContext * context,
|
|||
}
|
||||
#endif
|
||||
|
||||
if (replacement)
|
||||
gst_object_replace ((GstObject **) display, (GstObject *) replacement);
|
||||
if (replacement) {
|
||||
GstGLDisplay *old = *display;
|
||||
*display = replacement;
|
||||
gst_object_unref (old);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue