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:
Matthew Waters 2014-08-19 20:14:22 +10:00
parent 30ddb384ab
commit cb4fd36e7e

View file

@ -767,8 +767,11 @@ gst_gl_handle_set_context (GstElement * element, GstContext * context,
} }
#endif #endif
if (replacement) if (replacement) {
gst_object_replace ((GstObject **) display, (GstObject *) replacement); GstGLDisplay *old = *display;
*display = replacement;
gst_object_unref (old);
}
return TRUE; return TRUE;
} }