diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-12-11 16:26:07 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-12-11 16:26:07 +0000 |
commit | 370882482aeacefa647849f67f50dee6b05d6801 (patch) | |
tree | 44dcaed86d868a3012bae403202d5b34916aaf57 | |
parent | b23e28b2f293e8cf5d8c890ed02fe84c8f92d20f (diff) | |
download | gst-plugins-bad-370882482aeacefa647849f67f50dee6b05d6801.tar.gz gst-plugins-bad-370882482aeacefa647849f67f50dee6b05d6801.tar.bz2 gst-plugins-bad-370882482aeacefa647849f67f50dee6b05d6801.zip |
ext/x264/gstx264enc.c: Fix caps memleak.
Original commit message from CVS:
* ext/x264/gstx264enc.c: (gst_x264_enc_set_src_caps):
Fix caps memleak.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/x264/gstx264enc.c | 9 |
2 files changed, 12 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2007-12-11 Wim Taymans <wim.taymans@collabora.co.uk> + + * ext/x264/gstx264enc.c: (gst_x264_enc_set_src_caps): + Fix caps memleak. + 2007-12-11 Tim-Philipp Müller <tim at centricular dot net> * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c index 70b94a70..92f003b3 100644 --- a/ext/x264/gstx264enc.c +++ b/ext/x264/gstx264enc.c @@ -285,6 +285,8 @@ gst_x264_enc_set_src_caps (GstX264Enc * encoder, GstPad * pad, GstCaps * caps) GstStructure *structure; GValue header = { 0, }; GstBuffer *buf; + GstCaps *outcaps; + gboolean res; structure = gst_caps_get_structure (caps, 0); structure = gst_structure_copy (structure); @@ -301,8 +303,11 @@ gst_x264_enc_set_src_caps (GstX264Enc * encoder, GstPad * pad, GstCaps * caps) } } - /* FIXME: doesn't this leak? (tpm) */ - return gst_pad_set_caps (pad, gst_caps_new_full (structure, NULL)); + outcaps = gst_caps_new_full (structure, NULL); + res = gst_pad_set_caps (pad, outcaps); + gst_caps_unref (outcaps); + + return res; } static gboolean |