mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
pulse: Don't leak caps and structures in the device provider
This commit is contained in:
parent
7e22ea5d5a
commit
e686ec0c97
1 changed files with 4 additions and 0 deletions
|
@ -607,6 +607,7 @@ gst_pulse_device_reconfigure_element (GstDevice * device, GstElement * element)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Takes ownership of @caps and @props */
|
||||||
static GstDevice *
|
static GstDevice *
|
||||||
gst_pulse_device_new (guint device_index, const gchar * device_name,
|
gst_pulse_device_new (guint device_index, const gchar * device_name,
|
||||||
GstCaps * caps, const gchar * internal_name, GstPulseDeviceType type,
|
GstCaps * caps, const gchar * internal_name, GstPulseDeviceType type,
|
||||||
|
@ -644,6 +645,9 @@ gst_pulse_device_new (guint device_index, const gchar * device_name,
|
||||||
gstdev->device_index = device_index;
|
gstdev->device_index = device_index;
|
||||||
gstdev->element = element;
|
gstdev->element = element;
|
||||||
|
|
||||||
|
gst_structure_free (props);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
return GST_DEVICE (gstdev);
|
return GST_DEVICE (gstdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue