From ab55ad7eaad4fa2c0b16c789350e882cf70a27ed Mon Sep 17 00:00:00 2001 From: Stian Selnes Date: Wed, 27 Jan 2016 13:20:23 +0100 Subject: [PATCH] ghostpad: Do nothing in _internal_activate_push_default When calling gst_pad_activate_mode() on a ghostpad gst_ghost_pad_activate_push_default() will be called. This will call gst_pad_activate_mode() on the proxypad (which is internal of the ghostpad), calling gst_ghost_pad_internal_activate_push_default(), which again will call gst_pad_activate_mode() on the original ghostpad. By simply returning TRUE in gst_ghost_pad_internal_activate_push_default() the redundant call to gst_pad_activate_mode() (for the same pad) is avoided. https://bugzilla.gnome.org/show_bug.cgi?id=761913 --- gst/gstghostpad.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/gst/gstghostpad.c b/gst/gstghostpad.c index 96703ed3eb..cf97947f62 100644 --- a/gst/gstghostpad.c +++ b/gst/gstghostpad.c @@ -277,19 +277,7 @@ static gboolean gst_ghost_pad_internal_activate_push_default (GstPad * pad, GstObject * parent, gboolean active) { - gboolean ret; - GstPad *other; - - GST_LOG_OBJECT (pad, "%sactivate push on %s:%s, we're ok", - (active ? "" : "de"), GST_DEBUG_PAD_NAME (pad)); - - /* in both cases (SRC and SINK) we activate just the internal pad. The targets - * will be activated later (or already in case of a ghost sinkpad). */ - GST_PROXY_PAD_ACQUIRE_INTERNAL (pad, other, FALSE); - ret = gst_pad_activate_mode (other, GST_PAD_MODE_PUSH, active); - GST_PROXY_PAD_RELEASE_INTERNAL (other); - - return ret; + return TRUE; } static gboolean