mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
[MOVED FROM BAD 06/28] 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
64c7b47d97
commit
f5e3152262
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue