mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04: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
|
|
@ -1192,10 +1192,11 @@ static int do_remove_source(struct spa_loop *loop,
|
|||
struct state *state = user_data;
|
||||
|
||||
spa_loop_remove_source(state->data_loop, &state->timer_source);
|
||||
set_timeout(state, 0);
|
||||
|
||||
if (state->ports[0].direction == SPA_DIRECTION_OUTPUT) {
|
||||
if (state->ports[0].direction == SPA_DIRECTION_OUTPUT)
|
||||
spa_loop_remove_source(state->data_loop, &state->sock_source);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1209,7 +1210,6 @@ int spa_avb_pause(struct state *state)
|
|||
spa_loop_invoke(state->data_loop, do_remove_source, 0, NULL, 0, true, state);
|
||||
|
||||
state->started = false;
|
||||
set_timeout(state, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue