ghostpad: Do nothing in _internal_activate_push_default
authorStian Selnes <stian@pexip.com>
Wed, 27 Jan 2016 12:20:23 +0000 (13:20 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 17 Feb 2016 10:26:12 +0000 (12:26 +0200)
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

index 96703ed..cf97947 100644 (file)
@@ -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