optimize set_state_in_io_thread() callbacks

Source and sink are passed in arguments to set_state_in_io_thread()
callbacks. There is optimal to access them directly.
This commit is contained in:
Raman Shyshniou 2018-03-20 16:26:20 +03:00 committed by Arun Raghavan
parent de705a0eea
commit 556cdfa190
16 changed files with 41 additions and 41 deletions

View file

@ -183,7 +183,7 @@ static int sink_set_state_in_io_thread_cb(pa_sink *s, pa_sink_state_t new_state,
switch (new_state) {
case PA_SINK_SUSPENDED:
pa_assert(PA_SINK_IS_OPENED(u->sink->thread_info.state));
pa_assert(PA_SINK_IS_OPENED(s->thread_info.state));
pa_smoother_pause(u->smoother, pa_rtclock_now());
break;
@ -191,7 +191,7 @@ static int sink_set_state_in_io_thread_cb(pa_sink *s, pa_sink_state_t new_state,
case PA_SINK_IDLE:
case PA_SINK_RUNNING:
if (u->sink->thread_info.state == PA_SINK_SUSPENDED)
if (s->thread_info.state == PA_SINK_SUSPENDED)
pa_smoother_resume(u->smoother, pa_rtclock_now(), true);
break;