diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2009-02-11 19:16:42 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2009-02-11 20:26:32 +0200 |
commit | 86bec09fa843160dd671cf53a32c13fafa0cb932 (patch) | |
tree | 8bc14dce69e72b5b3076d4a376a04e3d6dedf6d2 /src/pulsecore/sink.c | |
parent | f56da989372bedc4817f8b37b78ad8f2daf5429d (diff) |
pulsecore: add PA_CORE_HOOK_*_MOVE_FAIL
In case pa_*_move_all_fail(), it is nicer to let a module override the
default behavior to fallback on a different sink/source. (instead of
unlinking the sink_input/source_output)
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r-- | src/pulsecore/sink.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 0c297ec3..558da8c6 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -533,8 +533,10 @@ void pa_sink_move_all_fail(pa_queue *q) { pa_assert(q); while ((i = PA_SINK_INPUT(pa_queue_pop(q)))) { - pa_sink_input_unlink(i); - pa_sink_input_unref(i); + if (pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_MOVE_FAIL], i) == PA_HOOK_OK) { + pa_sink_input_unlink(i); + pa_sink_input_unref(i); + } } pa_queue_free(q, NULL, NULL); |