gst: Don't ref_sink() GstObject subclasses in instance_init/constructor
authorSebastian Dröge <sebastian@centricular.com>
Mon, 15 May 2017 11:32:48 +0000 (14:32 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 17 May 2017 07:40:37 +0000 (10:40 +0300)
commitdaa98fc02a7bece11709b485645320c00bcd6599
tree5f09f9c1555dbb8d16b3d1020d31bc522f767420
parent30f871d274e8a544779c287a1a4c188f22c2066f
gst: Don't ref_sink() GstObject subclasses in instance_init/constructor

This is something bindings can't handle and it causes leaks. Instead
move the ref_sink() to the explicit, new() constructors.

This means that abstract classes, and anything that can have subclasses,
will have to do ref_sink() in their new() function now. Specifically
this affects GstClock and GstControlSource.

https://bugzilla.gnome.org/show_bug.cgi?id=743062
14 files changed:
gst/gstbus.c
gst/gstclock.c
gst/gstcontrolsource.c
gst/gstsystemclock.c
gst/gsttask.c
gst/gsttaskpool.c
libs/gst/base/gstcollectpads.c
libs/gst/check/gsttestclock.c
libs/gst/controller/gstinterpolationcontrolsource.c
libs/gst/controller/gstlfocontrolsource.c
libs/gst/controller/gsttriggercontrolsource.c
libs/gst/net/gstnetclientclock.c
libs/gst/net/gstptpclock.c
tests/check/gst/gstcontroller.c