mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
Revert "ghostpad: copy sticky events to SRC ghostpads"
This reverts commit 8162a583a4
.
Automatically copying the sticky events makes it impossible for apps
and elements to filter the events with event probes. This causes
regressions (See #719437). The best option is to let the app/element
copy and filter the events themselves after the ghostpad target is
set.
This commit is contained in:
parent
56d74ddb64
commit
fe36be1c03
1 changed files with 0 additions and 35 deletions
|
@ -804,26 +804,6 @@ gst_ghost_pad_get_target (GstGhostPad * gpad)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clear_sticky_events (GstPad * pad, GstEvent ** event, gpointer user_data)
|
||||
{
|
||||
GST_DEBUG_OBJECT (pad, "clearing sticky event %" GST_PTR_FORMAT, *event);
|
||||
gst_event_unref (*event);
|
||||
*event = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
copy_sticky_events (GstPad * pad, GstEvent ** event, gpointer user_data)
|
||||
{
|
||||
GstPad *internal = GST_PAD_CAST (user_data);
|
||||
|
||||
GST_DEBUG_OBJECT (internal, "store sticky event %" GST_PTR_FORMAT, *event);
|
||||
gst_pad_store_sticky_event (internal, *event);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_ghost_pad_set_target:
|
||||
* @gpad: the #GstGhostPad
|
||||
|
@ -864,14 +844,6 @@ gst_ghost_pad_set_target (GstGhostPad * gpad, GstPad * newtarget)
|
|||
gst_pad_unlink (internal, oldtarget);
|
||||
else
|
||||
gst_pad_unlink (oldtarget, internal);
|
||||
|
||||
if (GST_PAD_IS_SRC (gpad)) {
|
||||
/* only clear the events on the SRC ghostpad. We don't clear sink
|
||||
* ghostpads, they got their events from downstream and we want to
|
||||
* set the same events on the target later. */
|
||||
gst_pad_sticky_events_foreach (GST_PAD_CAST (gpad), clear_sticky_events,
|
||||
NULL);
|
||||
}
|
||||
} else {
|
||||
GST_OBJECT_UNLOCK (gpad);
|
||||
}
|
||||
|
@ -890,13 +862,6 @@ gst_ghost_pad_set_target (GstGhostPad * gpad, GstPad * newtarget)
|
|||
|
||||
if (lret != GST_PAD_LINK_OK)
|
||||
goto link_failed;
|
||||
|
||||
if (GST_PAD_IS_SRC (gpad)) {
|
||||
/* only copy the events to the SRC ghostpad. We don't copy to sink
|
||||
* ghostpads, they got their events from downstream and we don't want
|
||||
* to overwrite those with events from this new target. */
|
||||
gst_pad_sticky_events_foreach (newtarget, copy_sticky_events, gpad);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue