decoder_control: pass pipe and buffer to dc_start()

Don't access decoder_control attributes directly.
This commit is contained in:
Max Kellermann
2009-11-03 21:18:22 +01:00
parent 98150f503a
commit 98d30ac9cf
3 changed files with 25 additions and 14 deletions

View File

@@ -84,12 +84,16 @@ dc_command_async(struct decoder_control *dc, enum decoder_command cmd)
}
void
dc_start(struct decoder_control *dc, struct song *song)
dc_start(struct decoder_control *dc, struct song *song,
struct music_buffer *buffer, struct music_pipe *pipe)
{
assert(dc->pipe != NULL);
assert(song != NULL);
assert(buffer != NULL);
assert(pipe != NULL);
dc->song = song;
dc->buffer = buffer;
dc->pipe = pipe;
dc_command(dc, DECODE_COMMAND_START);
}