mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-14 08:56:37 -05:00
audioconvert: only dequeue a buffer when queued
Add an extra check to only dequeue a buffer when it's queued. This should always be the case but let's check again to be safe. See #3384
This commit is contained in:
parent
950c2d2675
commit
35d932bc8b
1 changed files with 4 additions and 2 deletions
|
|
@ -2331,10 +2331,12 @@ static inline struct buffer *peek_buffer(struct impl *this, struct port *port)
|
||||||
|
|
||||||
static inline void dequeue_buffer(struct impl *this, struct port *port, struct buffer *b)
|
static inline void dequeue_buffer(struct impl *this, struct port *port, struct buffer *b)
|
||||||
{
|
{
|
||||||
spa_list_remove(&b->link);
|
|
||||||
SPA_FLAG_CLEAR(b->flags, BUFFER_FLAG_QUEUED);
|
|
||||||
spa_log_trace_fp(this->log, "%p: dequeue buffer %d on port %d %u",
|
spa_log_trace_fp(this->log, "%p: dequeue buffer %d on port %d %u",
|
||||||
this, b->id, port->id, b->flags);
|
this, b->id, port->id, b->flags);
|
||||||
|
if (!SPA_FLAG_IS_SET(b->flags, BUFFER_FLAG_QUEUED))
|
||||||
|
return;
|
||||||
|
spa_list_remove(&b->link);
|
||||||
|
SPA_FLAG_CLEAR(b->flags, BUFFER_FLAG_QUEUED);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue