From 8067bcc54f4f0565d82a1c47081fc59c42a42ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 24 Feb 2011 15:55:00 +0100 Subject: [PATCH] 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. --- gst/encoding/gstencodebin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c index 0ca3981f20..c1a0e8bbc0 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 *