diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-02-24 15:55:00 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-02-24 15:55:00 +0100 |
commit | 8067bcc54f4f0565d82a1c47081fc59c42a42ba5 (patch) | |
tree | 9990510ee32d845b936d70cff846c544dd249e1c /gst/encoding | |
parent | 27178f7aff309132ce32bba1d995ab59d2466eeb (diff) |
encodebin: Return a new reference of the pad for the "request-pad" signal
The GObject signal code assumes that the signal handlers return a
new reference or copy. Fixes bug #641927.
Diffstat (limited to 'gst/encoding')
-rw-r--r-- | gst/encoding/gstencodebin.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c index 0ca3981f2..c1a0e8bbc 100644 --- a/gst/encoding/gstencodebin.c +++ b/gst/encoding/gstencodebin.c @@ -670,7 +670,9 @@ gst_encode_bin_request_new_pad (GstElement * element, static GstPad * gst_encode_bin_request_pad_signal (GstEncodeBin * encodebin, GstCaps * caps) { - return request_pad_for_stream (encodebin, G_TYPE_NONE, NULL, caps); + GstPad *pad = request_pad_for_stream (encodebin, G_TYPE_NONE, NULL, caps); + + return pad ? GST_PAD_CAST (gst_object_ref (pad)) : NULL; } static inline StreamGroup * |