mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
openal: Unref pad template caps after usage
https://bugzilla.gnome.org/show_bug.cgi?id=734520
This commit is contained in:
parent
2f8e528f37
commit
b53433fbbf
2 changed files with 7 additions and 2 deletions
|
@ -575,7 +575,9 @@ gst_openal_sink_getcaps (GstBaseSink * basesink, GstCaps * filter)
|
|||
|
||||
if (sink->default_device == NULL) {
|
||||
GstPad *pad = GST_BASE_SINK_PAD (basesink);
|
||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
|
||||
GstCaps *tcaps = gst_pad_get_pad_template_caps (pad);
|
||||
caps = gst_caps_copy (tcaps);
|
||||
gst_caps_unref (tcaps);
|
||||
} else if (sink->probed_caps)
|
||||
caps = gst_caps_copy (sink->probed_caps);
|
||||
else {
|
||||
|
|
|
@ -335,9 +335,12 @@ gst_openal_src_getcaps (GstBaseSrc * basesrc, GstCaps * filter)
|
|||
|
||||
if (device == NULL) {
|
||||
GstPad *pad = GST_BASE_SRC_PAD (basesrc);
|
||||
GstCaps *tcaps = gst_pad_get_pad_template_caps (pad);
|
||||
|
||||
GST_ELEMENT_WARNING (openalsrc, RESOURCE, OPEN_WRITE,
|
||||
("Could not open temporary device."), GST_ALC_ERROR (device));
|
||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
|
||||
caps = gst_caps_copy (tcaps);
|
||||
gst_caps_unref (tcaps);
|
||||
} else if (openalsrc->probed_caps)
|
||||
caps = gst_caps_copy (openalsrc->probed_caps);
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue