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 committed by Tim-Philipp Müller
parent 94efcd2595
commit a76fe07919

View file

@ -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;
}