diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2014-03-06 12:40:23 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2014-04-12 12:06:43 +0100 |
commit | c72ba7e3d9d446d4e00a4206d5bc345b53efdd32 (patch) | |
tree | c57c8c410343783aa0aeb2f20fb21ed57d310b17 | |
parent | 3e043378d88a4087692a56d971c6c0b5af6a0d70 (diff) | |
download | gstreamer-c72ba7e3d9d446d4e00a4206d5bc345b53efdd32.tar.gz |
ghostpad: hold a reference to the target pad while unlinking it
https://bugzilla.gnome.org/show_bug.cgi?id=725809
-rw-r--r-- | gst/gstghostpad.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/gstghostpad.c b/gst/gstghostpad.c index 98712d8aa6..47e9dce2da 100644 --- a/gst/gstghostpad.c +++ b/gst/gstghostpad.c @@ -836,7 +836,7 @@ gst_ghost_pad_set_target (GstGhostPad * gpad, GstPad * newtarget) GST_DEBUG_OBJECT (gpad, "clearing target"); /* clear old target */ - if ((oldtarget = GST_PROXY_PAD_TARGET (gpad))) { + if ((oldtarget = gst_pad_get_peer (internal))) { GST_OBJECT_UNLOCK (gpad); /* unlink internal pad */ @@ -844,6 +844,8 @@ gst_ghost_pad_set_target (GstGhostPad * gpad, GstPad * newtarget) gst_pad_unlink (internal, oldtarget); else gst_pad_unlink (oldtarget, internal); + + gst_object_unref (oldtarget); } else { GST_OBJECT_UNLOCK (gpad); } |