mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
spa: reuse code to clear the timers
We have set_timeout and enable_flush_timer functions to disable the timers so use those.
This commit is contained in:
parent
78b8e1af57
commit
3698593481
7 changed files with 12 additions and 51 deletions
|
|
@ -761,15 +761,10 @@ static int do_remove_source(struct spa_loop *loop,
|
|||
void *user_data)
|
||||
{
|
||||
struct impl *this = user_data;
|
||||
struct itimerspec ts;
|
||||
|
||||
if (this->timer_source.loop)
|
||||
spa_loop_remove_source(this->data_loop, &this->timer_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;
|
||||
spa_system_timerfd_settime(this->data_system, this->timerfd, 0, &ts, NULL);
|
||||
set_timeout(this, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue