diff options
author | Max Kellermann <max@duempel.org> | 2009-12-26 01:10:23 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-26 02:58:30 +0100 |
commit | 915d1d0738c1327d30ad1d2a9d58fa96fb136db8 (patch) | |
tree | 8a4c2d1ae9ae3ee52469316644c1d876557b3413 | |
parent | 8a6d448aaf2095a691982eb7c2942dbad125a755 (diff) | |
download | mpd-915d1d0738c1327d30ad1d2a9d58fa96fb136db8.tar.gz mpd-915d1d0738c1327d30ad1d2a9d58fa96fb136db8.tar.xz mpd-915d1d0738c1327d30ad1d2a9d58fa96fb136db8.zip |
decoder_thread: eliminate jitter after seek failure
Don't clear the music pipe when seeking has failed - check the
"seeking" flag instead of "command==SEEK". Clear the "seeking" flag
in decoder_seek_error().
Diffstat (limited to '')
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/decoder_api.c | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -8,6 +8,7 @@ ver 0.15.7 (2009/??/??) * tags: - id3: fix ID3v1 charset conversion * decoders: + - eliminate jitter after seek failure - ffmpeg: don't try to force stereo - wavpack: allow fine-grained seeking * mixer: explicitly close all mixers on shutdown diff --git a/src/decoder_api.c b/src/decoder_api.c index 2ece3bb98..c696ba101 100644 --- a/src/decoder_api.c +++ b/src/decoder_api.c @@ -93,7 +93,9 @@ void decoder_command_finished(G_GNUC_UNUSED struct decoder * decoder) dc.seek_error || decoder->seeking); assert(dc.pipe != NULL); - if (dc.command == DECODE_COMMAND_SEEK) { + if (decoder->seeking) { + decoder->seeking = false; + /* delete frames from the old song position */ if (decoder->chunk != NULL) { @@ -124,6 +126,8 @@ void decoder_seek_error(struct decoder * decoder) assert(dc.pipe != NULL); dc.seek_error = true; + decoder->seeking = false; + decoder_command_finished(decoder); } |