mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04: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)
|
||||
{
|
||||
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",
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue