multiqueue: Fix query unref race on flush
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Mon, 4 Oct 2021 11:49:44 +0000 (13:49 +0200)
committerSebastian Dröge <slomo@coaxion.net>
Tue, 5 Oct 2021 06:36:48 +0000 (06:36 +0000)
commit5aa825d00441dcb230db83424572796ef5e6307f
treeba21e80c5cdc401bcf58e62e67d9825395af2569
parentc4e14ef426e73d7b88d2c7347c5009e7b7e0702f
multiqueue: Fix query unref race on flush

If the query has already been destroyed at this point, GST_IS_QUERY will
read garbage, can return false and we will try to unref it again.
Instead, make note of whether the item is a query when we dequeue it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1029>
subprojects/gstreamer/plugins/elements/gstmultiqueue.c