aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/flac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-11 15:14:20 +0100
committerMax Kellermann <max@duempel.org>2009-11-11 15:14:20 +0100
commit5cc3c4f5039cc57b414de3b94bb3ab0e54f28556 (patch)
treec466f210381ac70e1dd84aa10d529cb6c31394cd /src/decoder/flac_plugin.c
parent96204ea3dc70521b6df1b01dd6f7c799e6d42ec1 (diff)
parentdca4d9cf83849877206379a20a1e478ed1b5dc55 (diff)
downloadmpd-5cc3c4f5039cc57b414de3b94bb3ab0e54f28556.tar.gz
mpd-5cc3c4f5039cc57b414de3b94bb3ab0e54f28556.tar.xz
mpd-5cc3c4f5039cc57b414de3b94bb3ab0e54f28556.zip
Merge remote branch 'origin/v0.15.x'
Diffstat (limited to '')
-rw-r--r--src/decoder/flac_plugin.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/decoder/flac_plugin.c b/src/decoder/flac_plugin.c
index cdb74e72d..17d0e8519 100644
--- a/src/decoder/flac_plugin.c
+++ b/src/decoder/flac_plugin.c
@@ -632,21 +632,15 @@ flac_container_decode(struct decoder* decoder,
FLAC__uint64 seek_sample = t_start +
(decoder_seek_where(decoder) * data.audio_format.sample_rate);
- //if (seek_sample >= t_start && seek_sample <= t_end && data.total_time > 30)
- if (seek_sample >= t_start && seek_sample <= t_end)
- {
- if (flac_seek_absolute(flac_dec, (FLAC__uint64)seek_sample))
- {
- data.time = (float)(seek_sample - t_start) /
- data.audio_format.sample_rate;
- data.position = 0;
+ if (seek_sample >= t_start && seek_sample <= t_end &&
+ flac_seek_absolute(flac_dec, (FLAC__uint64)seek_sample)) {
+ data.time = (float)(seek_sample - t_start) /
+ data.audio_format.sample_rate;
+ data.position = 0;
- decoder_command_finished(decoder);
- }
- else
- decoder_seek_error(decoder);
- //decoder_command_finished(decoder);
- }
+ decoder_command_finished(decoder);
+ } else
+ decoder_seek_error(decoder);
}
else if (flac_get_state(flac_dec) == flac_decoder_eof)
break;