summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-06-21 02:28:34 +0200
committerLennart Poettering <lennart@poettering.net>2008-06-21 02:28:34 +0200
commitd9f8b6a5030f9b9ef7cf255eedbe044c97069a19 (patch)
tree34bf0bc20850932d12f3c2227a7982d884f32886 /src/modules
parent947d8b4c098beb13cf4822e49c5c6b41a4856135 (diff)
since the sink is unlinked before the sink input we need to make sure we don't call any function for unlinked sinks from any sink input callback
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/module-ladspa-sink.c10
-rw-r--r--src/modules/module-remap-sink.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index ca1c05c3..d86a72f4 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -260,7 +260,7 @@ static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- if (!u->sink)
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
pa_memblockq_set_maxrewind(u->memblockq, nbytes);
@@ -274,7 +274,7 @@ static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- if (!u->sink)
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
pa_sink_set_max_request(u->sink, nbytes);
@@ -287,7 +287,7 @@ static void sink_input_update_sink_latency_range_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- if (!u->sink)
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
pa_sink_update_latency_range(u->sink, i->sink->thread_info.min_latency, i->sink->thread_info.max_latency);
@@ -300,7 +300,7 @@ static void sink_input_detach_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- if (!u->sink)
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
pa_sink_detach_within_thread(u->sink);
@@ -315,7 +315,7 @@ static void sink_input_attach_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- if (!u->sink)
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
pa_sink_set_asyncmsgq(u->sink, i->sink->asyncmsgq);
diff --git a/src/modules/module-remap-sink.c b/src/modules/module-remap-sink.c
index ac39fa18..2c9b6daf 100644
--- a/src/modules/module-remap-sink.c
+++ b/src/modules/module-remap-sink.c
@@ -179,7 +179,7 @@ static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- if (!u->sink)
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
pa_sink_set_max_rewind(u->sink, nbytes);
@@ -192,7 +192,7 @@ static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- if (!u->sink)
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
pa_sink_set_max_request(u->sink, nbytes);
@@ -205,7 +205,7 @@ static void sink_input_update_sink_latency_range_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- if (!u->sink)
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
pa_sink_update_latency_range(u->sink, i->sink->thread_info.min_latency, i->sink->thread_info.max_latency);
@@ -218,7 +218,7 @@ static void sink_input_detach_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- if (!u->sink)
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
pa_sink_detach_within_thread(u->sink);
@@ -233,7 +233,7 @@ static void sink_input_attach_cb(pa_sink_input *i) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- if (!u->sink)
+ if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
pa_sink_set_asyncmsgq(u->sink, i->sink->asyncmsgq);