pad: Ensure that the pad is blocked for IDLE probes if they are called from the strea...
authorSebastian Dröge <sebastian@centricular.com>
Mon, 30 Jul 2018 15:51:35 +0000 (18:51 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 1 Aug 2018 11:23:04 +0000 (14:23 +0300)
commitc3d3cf074e4dc3f868d7d12c736be1e675cac432
treef2835145ef837ef23c704f07263c1df9361e6df0
parent41f1a4070492e059cba26b81a5cacc2300b28e57
pad: Ensure that the pad is blocked for IDLE probes if they are called from the streaming thread too

IDLE probes that are directly called when being added will increase /
decrease the "number of IDLE probes running" counter around the call,
but when running from the streaming thread this won't happen.

This has the effect that when running from a streaming thread it is
possible to push serialized events or data out of the pad without
problems, but otherwise it would deadlock because serialized data would
wait for the IDLE probe to finish first (it is blocking after all!).

With this change it will now always consistently deadlock instead of
just every once in a while, which should make it obvious why this
happens and prevent racy deadlocks in application code.

https://bugzilla.gnome.org/show_bug.cgi?id=796895
gst/gstpad.c