summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sink-input.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-08-03 22:29:55 +0000
committerLennart Poettering <lennart@poettering.net>2006-08-03 22:29:55 +0000
commitddc69fccb5eec6ed546b1d2fe1771c383eeb5413 (patch)
tree4c36e2c3609ad62f1b8831ba3adf06ae44d1ae8e /src/pulsecore/sink-input.c
parent7f93d08d4014cc68965611068c47834c1e5547ef (diff)
- don't call pa_sink_notify in pa_sink_input_new() because the virtual methods are not yet initialized at this time
- some minor cleanups git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1180 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/sink-input.c')
-rw-r--r--src/pulsecore/sink-input.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 8280d0bf..b89210f4 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -135,8 +135,10 @@ pa_sink_input* pa_sink_input_new(
pa_log_info(__FILE__": created %u \"%s\" on %u with sample spec \"%s\"", i->index, i->name, s->index, st);
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_NEW, i->index);
- pa_sink_notify(i->sink);
+ /* We do not call pa_sink_notify() here, because the virtual
+ * functions have not yet been initialized */
+
return i;
}
@@ -446,7 +448,7 @@ pa_resample_method_t pa_sink_input_get_resample_method(pa_sink_input *i) {
assert(i->ref >= 1);
if (!i->resampler)
- return PA_RESAMPLER_INVALID;
+ return i->resample_method;
return pa_resampler_get_method(i->resampler);
}
@@ -574,9 +576,9 @@ int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately) {
}
/* Okey, let's move it */
- pa_idxset_remove_by_data(i->sink->inputs, i, NULL);
+ pa_idxset_remove_by_data(origin->inputs, i, NULL);
+ pa_idxset_put(dest->inputs, i, NULL);
i->sink = dest;
- pa_idxset_put(i->sink->inputs, i, NULL);
/* Replace resampler */
if (new_resampler != i->resampler) {