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,7 +612,8 @@ static void a2dp_on_flush(struct spa_source *source)
|
||||||
|
|
||||||
if ((source->rmask & SPA_IO_OUT) == 0) {
|
if ((source->rmask & SPA_IO_OUT) == 0) {
|
||||||
spa_log_warn(this->log, "error %d", source->rmask);
|
spa_log_warn(this->log, "error %d", source->rmask);
|
||||||
spa_loop_remove_source(this->data_loop, &this->flush_source);
|
if (this->flush_source.loop)
|
||||||
|
spa_loop_remove_source(this->data_loop, &this->flush_source);
|
||||||
this->source.mask = 0;
|
this->source.mask = 0;
|
||||||
spa_loop_update_source(this->data_loop, &this->source);
|
spa_loop_update_source(this->data_loop, &this->source);
|
||||||
return;
|
return;
|
||||||
|
|
@ -812,13 +813,15 @@ static int do_remove_source(struct spa_loop *loop,
|
||||||
struct impl *this = user_data;
|
struct impl *this = user_data;
|
||||||
struct itimerspec ts;
|
struct itimerspec ts;
|
||||||
|
|
||||||
spa_loop_remove_source(this->data_loop, &this->source);
|
if (this->source.loop)
|
||||||
|
spa_loop_remove_source(this->data_loop, &this->source);
|
||||||
ts.it_value.tv_sec = 0;
|
ts.it_value.tv_sec = 0;
|
||||||
ts.it_value.tv_nsec = 0;
|
ts.it_value.tv_nsec = 0;
|
||||||
ts.it_interval.tv_sec = 0;
|
ts.it_interval.tv_sec = 0;
|
||||||
ts.it_interval.tv_nsec = 0;
|
ts.it_interval.tv_nsec = 0;
|
||||||
timerfd_settime(this->timerfd, 0, &ts, NULL);
|
timerfd_settime(this->timerfd, 0, &ts, NULL);
|
||||||
spa_loop_remove_source(this->data_loop, &this->flush_source);
|
if (this->flush_source.loop)
|
||||||
|
spa_loop_remove_source(this->data_loop, &this->flush_source);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue