mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
a2dp-sink: remove sources only once
This commit is contained in:
parent
b122f86e11
commit
f9bda23e56
1 changed files with 6 additions and 3 deletions
|
|
@ -612,6 +612,7 @@ static void a2dp_on_flush(struct spa_source *source)
|
|||
|
||||
if ((source->rmask & SPA_IO_OUT) == 0) {
|
||||
spa_log_warn(this->log, "error %d", source->rmask);
|
||||
if (this->flush_source.loop)
|
||||
spa_loop_remove_source(this->data_loop, &this->flush_source);
|
||||
this->source.mask = 0;
|
||||
spa_loop_update_source(this->data_loop, &this->source);
|
||||
|
|
@ -812,12 +813,14 @@ static int do_remove_source(struct spa_loop *loop,
|
|||
struct impl *this = user_data;
|
||||
struct itimerspec ts;
|
||||
|
||||
if (this->source.loop)
|
||||
spa_loop_remove_source(this->data_loop, &this->source);
|
||||
ts.it_value.tv_sec = 0;
|
||||
ts.it_value.tv_nsec = 0;
|
||||
ts.it_interval.tv_sec = 0;
|
||||
ts.it_interval.tv_nsec = 0;
|
||||
timerfd_settime(this->timerfd, 0, &ts, NULL);
|
||||
if (this->flush_source.loop)
|
||||
spa_loop_remove_source(this->data_loop, &this->flush_source);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue