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_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