mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
queue2: Fix deadlock when deactivate is called in pull mode
check is flush was called before waiting on condition Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2967>
This commit is contained in:
parent
03a24de4cb
commit
ccef26908e
1 changed files with 6 additions and 0 deletions
|
@ -218,6 +218,9 @@ static GParamSpec *obj_props[PROP_LAST] = { NULL, };
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
|
|
||||||
#define GST_QUEUE2_WAIT_DEL_CHECK(q, res, label) G_STMT_START { \
|
#define GST_QUEUE2_WAIT_DEL_CHECK(q, res, label) G_STMT_START { \
|
||||||
|
if (res != GST_FLOW_OK) { \
|
||||||
|
goto label; \
|
||||||
|
} \
|
||||||
STATUS (queue, q->sinkpad, "wait for DEL"); \
|
STATUS (queue, q->sinkpad, "wait for DEL"); \
|
||||||
q->waiting_del = TRUE; \
|
q->waiting_del = TRUE; \
|
||||||
g_cond_wait (&q->item_del, &queue->qlock); \
|
g_cond_wait (&q->item_del, &queue->qlock); \
|
||||||
|
@ -230,6 +233,9 @@ static GParamSpec *obj_props[PROP_LAST] = { NULL, };
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
|
|
||||||
#define GST_QUEUE2_WAIT_ADD_CHECK(q, res, label) G_STMT_START { \
|
#define GST_QUEUE2_WAIT_ADD_CHECK(q, res, label) G_STMT_START { \
|
||||||
|
if (res != GST_FLOW_OK) { \
|
||||||
|
goto label; \
|
||||||
|
} \
|
||||||
STATUS (queue, q->srcpad, "wait for ADD"); \
|
STATUS (queue, q->srcpad, "wait for ADD"); \
|
||||||
q->waiting_add = TRUE; \
|
q->waiting_add = TRUE; \
|
||||||
g_cond_wait (&q->item_add, &q->qlock); \
|
g_cond_wait (&q->item_add, &q->qlock); \
|
||||||
|
|
Loading…
Reference in a new issue