GNOME Bugzilla – Bug 168493
[API] gst_index_factory_new() doesn't increase refcount of existing factory
Last modified: 2005-03-12 20:07:13 UTC
If gst_index_factory_new() finds a factory via gst_index_factory_find(), it simply returns it without increasing its refcount. Usually, constructors return a new object, so the receiver can always assume ownership without manually increasing the refcount himself. In this case, the receiver can't be sure if he really owns the factory, which leads to either segfaults or leaks. This is especially visible in language bindings which need to be very careful about refcounts to avoid having dangling pointers all over the place.
Fixed.
You used gst_object_ref (GST_OBJECT (factory)) in the change, but GstIndexFactory is no GstObject. It's a GstPluginFeature which in turn is a GObject.
Oops, I'm very sorry. Fixed again.