mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
operation: keep ref on stream
This commit is contained in:
parent
6db8e05256
commit
21c11e70fb
1 changed files with 3 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ pa_operation *pa_operation_new(pa_context *c, pa_stream *s, pa_operation_cb_t cb
|
||||||
|
|
||||||
o->refcount = 1;
|
o->refcount = 1;
|
||||||
o->context = c;
|
o->context = c;
|
||||||
o->stream = s;
|
o->stream = s ? pa_stream_ref(s) : NULL;
|
||||||
o->seq = SPA_ID_INVALID;
|
o->seq = SPA_ID_INVALID;
|
||||||
|
|
||||||
o->state = PA_OPERATION_RUNNING;
|
o->state = PA_OPERATION_RUNNING;
|
||||||
|
|
@ -86,7 +86,8 @@ static void operation_unlink(pa_operation *o) {
|
||||||
|
|
||||||
o->context = NULL;
|
o->context = NULL;
|
||||||
}
|
}
|
||||||
|
if (o->stream)
|
||||||
|
pa_stream_unref(o->stream);
|
||||||
o->stream = NULL;
|
o->stream = NULL;
|
||||||
o->callback = NULL;
|
o->callback = NULL;
|
||||||
o->userdata = NULL;
|
o->userdata = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue