diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2011-08-25 14:55:14 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2011-08-25 15:17:01 +0100 |
commit | 02763b2fa206f7adf87a86a6c66ad4deba84e3bb (patch) | |
tree | 48c18cf12b8dc182a40826767c0ce341dd51273f /ext | |
parent | 791eeeb1a6d9221c09855eafb00fc19c73f6302f (diff) |
theoraenc: fix caps leak
https://bugzilla.gnome.org/show_bug.cgi?id=657333
Diffstat (limited to 'ext')
-rw-r--r-- | ext/theora/gsttheoraenc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/theora/gsttheoraenc.c b/ext/theora/gsttheoraenc.c index acc5bd607..5caf262a9 100644 --- a/ext/theora/gsttheoraenc.c +++ b/ext/theora/gsttheoraenc.c @@ -627,7 +627,7 @@ theora_enc_sink_getcaps (GstPad * pad) peer = gst_pad_get_peer (encoder->srcpad); if (peer) { const GstCaps *templ_caps; - GstCaps *peer_caps; + GstCaps *peer_caps, *tmp_caps; GstStructure *s; guint i, n; @@ -645,8 +645,9 @@ theora_enc_sink_getcaps (GstPad * pad) templ_caps = gst_pad_get_pad_template_caps (pad); - caps = gst_caps_intersect (peer_caps, templ_caps); - caps = gst_caps_intersect (caps, theora_enc_src_caps); + tmp_caps = gst_caps_intersect (peer_caps, templ_caps); + caps = gst_caps_intersect (tmp_caps, theora_enc_src_caps); + gst_caps_unref (tmp_caps); gst_caps_unref (peer_caps); gst_object_unref (peer); peer = NULL; |