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().
This commit is contained in:
parent
8a6d448aaf
commit
915d1d0738
1
NEWS
1
NEWS
|
@ -8,6 +8,7 @@ ver 0.15.7 (2009/??/??)
|
||||||
* tags:
|
* tags:
|
||||||
- id3: fix ID3v1 charset conversion
|
- id3: fix ID3v1 charset conversion
|
||||||
* decoders:
|
* decoders:
|
||||||
|
- eliminate jitter after seek failure
|
||||||
- ffmpeg: don't try to force stereo
|
- ffmpeg: don't try to force stereo
|
||||||
- wavpack: allow fine-grained seeking
|
- wavpack: allow fine-grained seeking
|
||||||
* mixer: explicitly close all mixers on shutdown
|
* mixer: explicitly close all mixers on shutdown
|
||||||
|
|
|
@ -93,7 +93,9 @@ void decoder_command_finished(G_GNUC_UNUSED struct decoder * decoder)
|
||||||
dc.seek_error || decoder->seeking);
|
dc.seek_error || decoder->seeking);
|
||||||
assert(dc.pipe != NULL);
|
assert(dc.pipe != NULL);
|
||||||
|
|
||||||
if (dc.command == DECODE_COMMAND_SEEK) {
|
if (decoder->seeking) {
|
||||||
|
decoder->seeking = false;
|
||||||
|
|
||||||
/* delete frames from the old song position */
|
/* delete frames from the old song position */
|
||||||
|
|
||||||
if (decoder->chunk != NULL) {
|
if (decoder->chunk != NULL) {
|
||||||
|
@ -124,6 +126,8 @@ void decoder_seek_error(struct decoder * decoder)
|
||||||
assert(dc.pipe != NULL);
|
assert(dc.pipe != NULL);
|
||||||
|
|
||||||
dc.seek_error = true;
|
dc.seek_error = true;
|
||||||
|
decoder->seeking = false;
|
||||||
|
|
||||||
decoder_command_finished(decoder);
|
decoder_command_finished(decoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue