sink-input: remove the DRAINED state

The only thing that the drained state was being used for was "pacmd
list-sink-inputs". In all other cases the drained and running states
were treated as equivalent. IMHO, this usage doesn't justify the
complexity that the additional state brings.

This patch was inspired by a bug report[1] that pointed out an error in
an if condition in pa_sink_input_set_state_within_thread(). The buggy
code is now removed altogether.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=106982
This commit is contained in:
Tanu Kaskinen 2018-06-26 16:25:56 +03:00
parent e40adfa9cc
commit 64ba239f65
4 changed files with 3 additions and 23 deletions

View file

@ -525,7 +525,6 @@ char *pa_sink_input_list_to_string(pa_core *c) {
static const char* const state_table[] = {
[PA_SINK_INPUT_INIT] = "INIT",
[PA_SINK_INPUT_RUNNING] = "RUNNING",
[PA_SINK_INPUT_DRAINED] = "DRAINED",
[PA_SINK_INPUT_CORKED] = "CORKED",
[PA_SINK_INPUT_UNLINKED] = "UNLINKED"
};