diff options
author | Max Kellermann <max@duempel.org> | 2009-03-06 00:42:03 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-06 00:42:03 +0100 |
commit | 01cf7feac7bef8b28605b98ef1e7438a995fc554 (patch) | |
tree | e1c4b7f5d0550d60d7fda8b4909353a47490fa4e /src/decoder_thread.c | |
parent | 000b2d4f3a9c4f761ab918aaff4705621bb8559f (diff) | |
download | mpd-01cf7feac7bef8b28605b98ef1e7438a995fc554.tar.gz mpd-01cf7feac7bef8b28605b98ef1e7438a995fc554.tar.xz mpd-01cf7feac7bef8b28605b98ef1e7438a995fc554.zip |
pipe: added music_buffer, rewrite music_pipe
Turn the music_pipe into a simple music_chunk queue. The music_chunk
allocation code is moved to music_buffer, and is now managed with a
linked list instead of a ring buffer. Two separate music_pipe objects
are used by the decoder for the "current" and the "next" song, which
greatly simplifies the cross-fading code.
Diffstat (limited to 'src/decoder_thread.c')
-rw-r--r-- | src/decoder_thread.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/decoder_thread.c b/src/decoder_thread.c index 97e92d295..a48f4160b 100644 --- a/src/decoder_thread.c +++ b/src/decoder_thread.c @@ -196,9 +196,8 @@ static void decoder_run_song(const struct song *song, const char *uri) pcm_convert_deinit(&decoder.conv_state); /* flush the last chunk */ - if (decoder.chunk != NULL && - decoder_flush_chunk(&decoder, NULL) != DECODE_COMMAND_NONE) - music_pipe_cancel(decoder.chunk); + if (decoder.chunk != NULL) + decoder_flush_chunk(&decoder); if (close_instream) input_stream_close(&input_stream); |