diff options
Diffstat (limited to 'src/modules/module-loopback.c')
-rw-r--r-- | src/modules/module-loopback.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c index 12ab12091..4456b559a 100644 --- a/src/modules/module-loopback.c +++ b/src/modules/module-loopback.c @@ -496,15 +496,14 @@ static void source_output_detach_cb(pa_source_output *o) { } } -/* Called from input thread context */ +/* Called from input thread context except when cork() is called without valid source. */ static void source_output_state_change_cb(pa_source_output *o, pa_source_output_state_t state) { struct userdata *u; pa_source_output_assert_ref(o); - pa_source_output_assert_io_context(o); pa_assert_se(u = o->userdata); - if (PA_SOURCE_OUTPUT_IS_LINKED(state) && o->thread_info.state == PA_SOURCE_OUTPUT_INIT) { + if (PA_SOURCE_OUTPUT_IS_LINKED(state) && o->thread_info.state == PA_SOURCE_OUTPUT_INIT && o->source) { u->skip = pa_usec_to_bytes(PA_CLIP_SUB(pa_source_get_latency_within_thread(o->source), u->latency), |