sink, source: Fix setting the latency offset when the sink/source is unlinked.

This commit is contained in:
Tanu Kaskinen 2012-06-28 16:34:56 +03:00
parent bf4091dcf8
commit 0c8fdf30d1
2 changed files with 2 additions and 2 deletions

View file

@ -3256,7 +3256,7 @@ void pa_sink_set_latency_offset(pa_sink *s, int64_t offset) {
if (PA_SINK_IS_LINKED(s->state))
pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_SET_LATENCY_OFFSET, NULL, offset, NULL) == 0);
else
s->thread_info.fixed_latency = offset;
s->thread_info.latency_offset = offset;
}
/* Called from main context */

View file

@ -2540,7 +2540,7 @@ void pa_source_set_latency_offset(pa_source *s, int64_t offset) {
if (PA_SOURCE_IS_LINKED(s->state))
pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_LATENCY_OFFSET, NULL, offset, NULL) == 0);
else
s->thread_info.fixed_latency = offset;
s->thread_info.latency_offset = offset;
}
/* Called from main thread */