mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
pulse: protect context
Make sure the context is READY when calling function Protect pa_operation_sync against disconnected context Fixes #365
This commit is contained in:
parent
7a43769648
commit
6444147a12
2 changed files with 52 additions and 1 deletions
|
|
@ -51,7 +51,8 @@ pa_operation *pa_operation_new(pa_context *c, pa_stream *s, pa_operation_cb_t cb
|
|||
int pa_operation_sync(pa_operation *o)
|
||||
{
|
||||
pa_context *c = o->context;
|
||||
c->pending_seq = pw_core_sync(c->core, PW_ID_CORE, 0);
|
||||
if (c->core != NULL)
|
||||
c->pending_seq = pw_core_sync(c->core, PW_ID_CORE, 0);
|
||||
o->sync = true;
|
||||
pw_log_debug("operation %p: sync seq:%d", o, c->pending_seq);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue