aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dbUtils.c1
-rw-r--r--src/decoder/wavpack_plugin.c5
-rw-r--r--src/decoder_api.c6
3 files changed, 7 insertions, 5 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index e56b7438d..7a0f532b8 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -268,7 +268,6 @@ visitTag(struct client *client, struct strset *set,
for (unsigned i = 0; i < tag->num_items; i++) {
if (tag->items[i]->type == tagType) {
strset_add(set, tag->items[i]->value);
- return;
}
}
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c
index 8b80b1476..fbcebb803 100644
--- a/src/decoder/wavpack_plugin.c
+++ b/src/decoder/wavpack_plugin.c
@@ -201,10 +201,9 @@ wavpack_decode(struct decoder *decoder, WavpackContext *wpc, bool can_seek,
do {
if (decoder_get_command(decoder) == DECODE_COMMAND_SEEK) {
if (can_seek) {
- int where;
+ unsigned where = decoder_seek_where(decoder) *
+ audio_format.sample_rate;
- where = decoder_seek_where(decoder);
- where *= audio_format.sample_rate;
if (WavpackSeekSample(wpc, where)) {
decoder_command_finished(decoder);
} else {
diff --git a/src/decoder_api.c b/src/decoder_api.c
index 704f6dbf7..e902c454a 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -107,7 +107,9 @@ decoder_command_finished(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) {
@@ -146,6 +148,8 @@ void decoder_seek_error(struct decoder * decoder)
assert(dc->pipe != NULL);
dc->seek_error = true;
+ decoder->seeking = false;
+
decoder_command_finished(decoder);
}