mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
jitterbuffer: fix caps leak
This commit is contained in:
parent
8f2ef99b5b
commit
c94c06530e
1 changed files with 4 additions and 3 deletions
|
@ -723,7 +723,7 @@ gst_rtp_jitter_buffer_getcaps (GstPad * pad, GstCaps * filter)
|
||||||
GstRtpJitterBufferPrivate *priv;
|
GstRtpJitterBufferPrivate *priv;
|
||||||
GstPad *other;
|
GstPad *other;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
const GstCaps *templ;
|
GstCaps *templ;
|
||||||
|
|
||||||
jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad));
|
jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad));
|
||||||
priv = jitterbuffer->priv;
|
priv = jitterbuffer->priv;
|
||||||
|
@ -734,8 +734,8 @@ gst_rtp_jitter_buffer_getcaps (GstPad * pad, GstCaps * filter)
|
||||||
|
|
||||||
templ = gst_pad_get_pad_template_caps (pad);
|
templ = gst_pad_get_pad_template_caps (pad);
|
||||||
if (caps == NULL) {
|
if (caps == NULL) {
|
||||||
GST_DEBUG_OBJECT (jitterbuffer, "copy template");
|
GST_DEBUG_OBJECT (jitterbuffer, "use template");
|
||||||
caps = gst_caps_copy (templ);
|
caps = templ;
|
||||||
} else {
|
} else {
|
||||||
GstCaps *intersect;
|
GstCaps *intersect;
|
||||||
|
|
||||||
|
@ -743,6 +743,7 @@ gst_rtp_jitter_buffer_getcaps (GstPad * pad, GstCaps * filter)
|
||||||
|
|
||||||
intersect = gst_caps_intersect (caps, templ);
|
intersect = gst_caps_intersect (caps, templ);
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
gst_caps_unref (templ);
|
||||||
|
|
||||||
caps = intersect;
|
caps = intersect;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue