bool linked;
pa_source_output *o, PA_UNUSED *p = NULL;
- pa_assert(i);
+ pa_sink_input_assert_ref(i);
pa_assert_ctl_context();
/* See pa_sink_unlink() for a couple of comments how this function
pa_assert(i);
pa_assert_ctl_context();
pa_assert(pa_sink_input_refcnt(i) == 0);
-
- if (PA_SINK_INPUT_IS_LINKED(i->state))
- pa_sink_input_unlink(i);
+ pa_assert(!PA_SINK_INPUT_IS_LINKED(i->state));
pa_log_info("Freeing input %u \"%s\"", i->index,
i->proplist ? pa_strnull(pa_proplist_gets(i->proplist, PA_PROP_MEDIA_NAME)) : "");
bool linked;
pa_sink_input *i, PA_UNUSED *j = NULL;
- pa_assert(s);
+ pa_sink_assert_ref(s);
pa_assert_ctl_context();
/* Please note that pa_sink_unlink() does more than simply
pa_assert(s);
pa_assert_ctl_context();
pa_assert(pa_sink_refcnt(s) == 0);
-
- if (PA_SINK_IS_LINKED(s->state))
- pa_sink_unlink(s);
+ pa_assert(!PA_SINK_IS_LINKED(s->state));
pa_log_info("Freeing sink %u \"%s\"", s->index, s->name);
/* Called from main context */
void pa_source_output_unlink(pa_source_output*o) {
bool linked;
- pa_assert(o);
+
+ pa_source_output_assert_ref(o);
pa_assert_ctl_context();
/* See pa_sink_unlink() for a couple of comments how this function
pa_assert(o);
pa_assert_ctl_context();
pa_assert(pa_source_output_refcnt(o) == 0);
-
- if (PA_SOURCE_OUTPUT_IS_LINKED(o->state))
- pa_source_output_unlink(o);
+ pa_assert(!PA_SOURCE_OUTPUT_IS_LINKED(o->state));
pa_log_info("Freeing output %u \"%s\"", o->index,
o->proplist ? pa_strnull(pa_proplist_gets(o->proplist, PA_PROP_MEDIA_NAME)) : "");
bool linked;
pa_source_output *o, PA_UNUSED *j = NULL;
- pa_assert(s);
+ pa_source_assert_ref(s);
pa_assert_ctl_context();
/* See pa_sink_unlink() for a couple of comments how this function
pa_assert(s);
pa_assert_ctl_context();
pa_assert(pa_source_refcnt(s) == 0);
-
- if (PA_SOURCE_IS_LINKED(s->state))
- pa_source_unlink(s);
+ pa_assert(!PA_SOURCE_IS_LINKED(s->state));
pa_log_info("Freeing source %u \"%s\"", s->index, s->name);