From c2f6d090c795bba9ef405908cee06bba79a87f1f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 1 Apr 2009 03:03:20 +0200 Subject: don't access i->sink if it is not set --- src/pulsecore/sink-input.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/pulsecore/sink-input.c') diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index da422428..537f198d 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -845,10 +845,12 @@ pa_usec_t pa_sink_input_set_requested_latency(pa_sink_input *i, pa_usec_t usec) /* If this sink input is not realized yet or we are being moved, * we have to touch the thread info data directly */ - pa_sink_get_latency_range(i->sink, &min_latency, &max_latency); + if (i->sink) { + pa_sink_get_latency_range(i->sink, &min_latency, &max_latency); - if (usec != (pa_usec_t) -1) - usec = PA_CLAMP(usec, min_latency, max_latency); + if (usec != (pa_usec_t) -1) + usec = PA_CLAMP(usec, min_latency, max_latency); + } i->thread_info.requested_sink_latency = usec; -- cgit From 75a8d18285f247b8a15dda8a3b545455d564d119 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 1 Apr 2009 03:04:39 +0200 Subject: pass destination source/sink when moving streams so that we can access them --- src/pulsecore/sink-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pulsecore/sink-input.c') diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index 537f198d..0ed16dd8 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -1167,7 +1167,7 @@ int pa_sink_input_finish_move(pa_sink_input *i, pa_sink *dest, pa_bool_t save) { new_resampler = NULL; if (i->moving) - i->moving(i); + i->moving(i, dest); i->sink = dest; i->save_sink = save; -- cgit