mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
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.
This commit is contained in:
parent
b23e28b2f2
commit
370882482a
2 changed files with 12 additions and 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>
|
2007-12-11 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio),
|
* gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio),
|
||||||
|
|
|
@ -285,6 +285,8 @@ gst_x264_enc_set_src_caps (GstX264Enc * encoder, GstPad * pad, GstCaps * caps)
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
GValue header = { 0, };
|
GValue header = { 0, };
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
|
GstCaps *outcaps;
|
||||||
|
gboolean res;
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
structure = gst_structure_copy (structure);
|
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) */
|
outcaps = gst_caps_new_full (structure, NULL);
|
||||||
return gst_pad_set_caps (pad, gst_caps_new_full (structure, NULL));
|
res = gst_pad_set_caps (pad, outcaps);
|
||||||
|
gst_caps_unref (outcaps);
|
||||||
|
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue