Otherwise we can forget to unref objects in error cases.
https://bugzilla.gnome.org/show_bug.cgi?id=736680
oldalloc = priv->allocator;
priv->allocator = allocator;
+ if (priv->pool)
+ gst_object_ref (priv->pool);
+ if (priv->allocator)
+ gst_object_ref (priv->allocator);
+
if (params)
priv->params = *params;
else
result = gst_base_src_set_allocation (basesrc, pool, allocator, ¶ms);
+ if (allocator)
+ gst_object_unref (allocator);
+ if (pool)
+ gst_object_unref (pool);
+
gst_query_unref (query);
return result;