queue2: Refuse all serialized queries when posting buffering messages
authorEdward Hervey <edward@centricular.com>
Fri, 16 Apr 2021 09:36:33 +0000 (11:36 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 16 Apr 2021 09:41:26 +0000 (11:41 +0200)
commit4eef67cc7ec36903801e3bbb62b43411b1f00b94
treed2d06a913f42cb2fc4b3d278090e638db6fcf4b4
parentb500ac31ab67b206815e564009afd7c547c00b45
queue2: Refuse all serialized queries when posting buffering messages

When posting buffering messages there are no safe places or timing to avoid
deadlocks.

Previously the code was trying to be "smart" by only forwarding serialized
queries if the queue was empty ... but that could happen when queue2 hadn't yet
posted a 100% buffering message. Meaning the pipeline might be paused and
pushing a serialized query downstream might never complete.

Therefore let's completely disable forwarding of serialized queries when
`queue2` is used as a buffering element (meaning `ALLOCATION` and `DRAIN`
queries).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/796>
plugins/elements/gstqueue2.c