appsrc: simplify get_property for "caps" property

This commit is contained in:
Tim-Philipp Müller 2012-05-17 22:06:45 +01:00
parent e110d8b6f4
commit 892cefe651

View file

@ -639,16 +639,8 @@ gst_app_src_get_property (GObject * object, guint prop_id, GValue * value,
switch (prop_id) { switch (prop_id) {
case PROP_CAPS: case PROP_CAPS:
{ g_value_take_boxed (value, gst_app_src_get_caps (appsrc));
GstCaps *caps;
/* we're missing a _take_caps() function to transfer ownership */
caps = gst_app_src_get_caps (appsrc);
gst_value_set_caps (value, caps);
if (caps)
gst_caps_unref (caps);
break; break;
}
case PROP_SIZE: case PROP_SIZE:
g_value_set_int64 (value, gst_app_src_get_size (appsrc)); g_value_set_int64 (value, gst_app_src_get_size (appsrc));
break; break;