mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
Increase ref counter of sink input as long as it is included in the sink idxset
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1542 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
d80fd10a67
commit
222a6d270e
2 changed files with 4 additions and 2 deletions
|
|
@ -198,7 +198,7 @@ pa_sink_input* pa_sink_input_new(
|
|||
i->thread_info.volume = i->volume;
|
||||
i->thread_info.muted = i->muted;
|
||||
|
||||
pa_assert_se(pa_idxset_put(core->sink_inputs, i, &i->index) == 0);
|
||||
pa_assert_se(pa_idxset_put(core->sink_inputs, pa_sink_input_ref(i), &i->index) == 0);
|
||||
pa_assert_se(pa_idxset_put(i->sink->inputs, i, NULL) == 0);
|
||||
|
||||
pa_log_info("Created input %u \"%s\" on %s with sample spec %s",
|
||||
|
|
@ -235,6 +235,7 @@ void pa_sink_input_disconnect(pa_sink_input *i) {
|
|||
pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_REMOVE_INPUT, i, NULL);
|
||||
pa_idxset_remove_by_data(i->sink->core->sink_inputs, i, NULL);
|
||||
pa_idxset_remove_by_data(i->sink->inputs, i, NULL);
|
||||
pa_sink_input_unref(i);
|
||||
|
||||
pa_subscription_post(i->sink->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_REMOVE, i->index);
|
||||
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ pa_source_output* pa_source_output_new(
|
|||
o->thread_info.resampler = resampler;
|
||||
|
||||
pa_assert_se(pa_idxset_put(core->source_outputs, o, &o->index) == 0);
|
||||
pa_assert_se( pa_idxset_put(o->source->outputs, o, NULL) == 0);
|
||||
pa_assert_se(pa_idxset_put(o->source->outputs, pa_source_output_ref(o), NULL) == 0);
|
||||
|
||||
pa_log_info("Created output %u \"%s\" on %s with sample spec %s",
|
||||
o->index,
|
||||
|
|
@ -191,6 +191,7 @@ void pa_source_output_disconnect(pa_source_output*o) {
|
|||
|
||||
pa_idxset_remove_by_data(o->source->core->source_outputs, o, NULL);
|
||||
pa_idxset_remove_by_data(o->source->outputs, o, NULL);
|
||||
pa_source_output_unref(o);
|
||||
|
||||
pa_subscription_post(o->source->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_REMOVE, o->index);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue