a2dp: try to completely process the queue

Continue processing the input data until we can't send anymore. When
we are following another driver, we need to process each buffer in
the cycle completely or we will start lagging behind.
This commit is contained in:
Wim Taymans 2020-09-02 17:51:33 +02:00
parent b54571c5a1
commit b8d65895c2

View file

@ -560,6 +560,7 @@ static int flush_data(struct impl *this, uint64_t now_time)
struct port *port = &this->port;
total_frames = 0;
again:
while (!spa_list_is_empty(&port->ready)) {
uint8_t *src;
uint32_t n_bytes, n_frames;
@ -642,6 +643,8 @@ static int flush_data(struct impl *this, uint64_t now_time)
increase_bitpool(this);
this->last_error = now_time;
}
if (!spa_list_is_empty(&port->ready))
goto again;
}
this->flush_source.mask = 0;