mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 12:41:05 +00:00
appsrc: simplify get_property for "caps" property
This commit is contained in:
parent
e110d8b6f4
commit
892cefe651
1 changed files with 1 additions and 9 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue