appsrc/sink: Fix optimization for only signalling waiters if someone is actually...
authorSebastian Dröge <sebastian@centricular.com>
Wed, 2 May 2018 15:11:58 +0000 (18:11 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 2 May 2018 15:11:58 +0000 (18:11 +0300)
commita19497ab67cf9517fb12f2bf30e034078d36a958
treeb8fdc5cffafc8bab3fff01d9fe19936c01fe3510
parent8600fc3148b43dbec7f9884956bc7723fd66e5f5
appsrc/sink: Fix optimization for only signalling waiters if someone is actually waiting

It is possible that both application and the stream are waiting
currently, if for example the following happens:
  1) app is waiting because no buffer in appsink
  2) appsink providing a buffer and waking up app
  3) appsink getting another buffer and waiting because it's full now
  4) app thread getting back control

Previously step 4 would overwrite that the appsink is currently waiting,
so it would never be signalled again.

https://bugzilla.gnome.org/show_bug.cgi?id=795551
gst-libs/gst/app/gstappsink.c
gst-libs/gst/app/gstappsrc.c