mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
pad: Don't call remaining probes after they return DROPPED|HANDLED
If multiple probes are set on a pad and one probe returns either GST_PAD_PROBE_HANDLED or GST_PAD_PROBE_DROPPED we need to stop calling the remaining probes. https://bugzilla.gnome.org/show_bug.cgi?id=787243
This commit is contained in:
parent
996bedb81d
commit
aed32ee2ab
1 changed files with 10 additions and 0 deletions
10
gst/gstpad.c
10
gst/gstpad.c
|
@ -3425,6 +3425,16 @@ probe_hook_marshal (GHook * hook, ProbeMarshall * data)
|
|||
if ((flags & GST_PAD_PROBE_TYPE_SCHEDULING & type) == 0)
|
||||
goto no_match;
|
||||
|
||||
if (G_UNLIKELY (data->handled)) {
|
||||
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
|
||||
"probe previously returned HANDLED, not calling again");
|
||||
goto no_match;
|
||||
} else if (G_UNLIKELY (data->dropped)) {
|
||||
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
|
||||
"probe previously returned DROPPED, not calling again");
|
||||
goto no_match;
|
||||
}
|
||||
|
||||
if (type & GST_PAD_PROBE_TYPE_PUSH) {
|
||||
/* one of the data types for non-idle probes */
|
||||
if ((type & GST_PAD_PROBE_TYPE_IDLE) == 0
|
||||
|
|
Loading…
Reference in a new issue