mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-11 19:06:33 +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
94efcd2595
commit
a76fe07919
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