pad: Fix for multiple blocking probes interaction.
authorJan Schmidt <jan@centricular.com>
Fri, 5 Feb 2021 16:41:23 +0000 (03:41 +1100)
committerJan Schmidt <jan@centricular.com>
Wed, 10 Feb 2021 02:43:28 +0000 (13:43 +1100)
commit170f694198509f23a2ad77e28d069b2d1fb2ece6
tree4fc5a1a7d29b9ac2d476d95f0cddd14b028541a6
parent5df982fd1038dd18d8298b5cdfb9a2414065fcb1
pad: Fix for multiple blocking probes interaction.

Change the way the marshalled flag in the internal ProbeMarshall state
is handled when iterating over pad probes so that it only counts
probes that still exist and would be called when retrying.

This improves the way that removing a blocking probe works when
there are multiple blocking probes for different conditions (data vs
events for example).

As a side-effect, probes aren't put into the the called_probes array
unless they actually match the current probe type and would be called,
potentially reducing the number of hooks that get stored in the
called_probes array, and the cost of the looping check on retries.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/658

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/749>
gst/gstpad.c