player_control: removed the global variable "pc"

Allocate a player_control object where needed, and pass it around.
Each "client" object is associated with a "player_control" instance.

This prepares multi-player support.
This commit is contained in:
Max Kellermann
2009-11-03 21:08:48 +01:00
parent 715844fd08
commit b6995ca011
42 changed files with 753 additions and 583 deletions

View File

@@ -65,7 +65,7 @@ need_chunks(struct decoder_control *dc, struct input_stream *is, bool do_wait)
if ((is == NULL || !decoder_input_buffer(dc, is)) && do_wait) {
decoder_wait(dc);
player_signal();
player_signal(dc->player_control);
return dc->command;
}