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:
Edward Hervey 2017-09-04 14:33:29 +02:00 committed by Edward Hervey
parent 996bedb81d
commit aed32ee2ab

View file

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