aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/flac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-11 20:28:10 +0100
committerMax Kellermann <max@duempel.org>2009-11-11 20:36:53 +0100
commit08b139f37c891b9b5f43f12910efda439add3f5b (patch)
treee4b9de9180d9428254c517227d93884d2e16087b /src/decoder/flac_plugin.c
parent3973aeecd2b4c91bd42ccc70155cebe8e2aedb8c (diff)
downloadmpd-08b139f37c891b9b5f43f12910efda439add3f5b.tar.gz
mpd-08b139f37c891b9b5f43f12910efda439add3f5b.tar.xz
mpd-08b139f37c891b9b5f43f12910efda439add3f5b.zip
decoder/flac: use stream_info instead of audio_format
Use the sample rate stored in the stream_info struct instead of the audio_format struct.
Diffstat (limited to 'src/decoder/flac_plugin.c')
-rw-r--r--src/decoder/flac_plugin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/flac_plugin.c b/src/decoder/flac_plugin.c
index cbb95bf45..1841c3f72 100644
--- a/src/decoder/flac_plugin.c
+++ b/src/decoder/flac_plugin.c
@@ -415,7 +415,7 @@ flac_decoder_initialize(struct flac_data *data, FLAC__StreamDecoder *sd,
decoder_initialized(data->decoder, &data->audio_format,
seekable,
(float)duration /
- (float)data->audio_format.sample_rate);
+ (float)data->stream_info.sample_rate);
return true;
}
@@ -440,7 +440,7 @@ flac_decoder_loop(struct flac_data *data, FLAC__StreamDecoder *flac_dec,
if (cmd == DECODE_COMMAND_SEEK) {
FLAC__uint64 seek_sample = t_start +
decoder_seek_where(decoder) *
- data->audio_format.sample_rate;
+ data->stream_info.sample_rate;
if (seek_sample >= t_start &&
(t_end == 0 || seek_sample <= t_end) &&
FLAC__stream_decoder_seek_absolute(flac_dec, seek_sample)) {