aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/oggflac_decoder_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-01-06 09:00:32 +0100
committerMax Kellermann <max@duempel.org>2010-01-06 09:00:32 +0100
commitae9c02b3a854cd8520eee696cdd68d0b0c32923f (patch)
treee4c9f522b28c7cf6460374334e178b42659ef508 /src/decoder/oggflac_decoder_plugin.c
parent6f6d47dd20d30b81eb710f41cd5149b0ed73f98e (diff)
downloadmpd-ae9c02b3a854cd8520eee696cdd68d0b0c32923f.tar.gz
mpd-ae9c02b3a854cd8520eee696cdd68d0b0c32923f.tar.xz
mpd-ae9c02b3a854cd8520eee696cdd68d0b0c32923f.zip
decoder/flac: remember audio_format, not stream_info
Diffstat (limited to '')
-rw-r--r--src/decoder/oggflac_decoder_plugin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/oggflac_decoder_plugin.c b/src/decoder/oggflac_decoder_plugin.c
index 502448a12..63438c2b9 100644
--- a/src/decoder/oggflac_decoder_plugin.c
+++ b/src/decoder/oggflac_decoder_plugin.c
@@ -302,8 +302,8 @@ oggflac_decode(struct decoder * mpd_decoder, struct input_stream *input_stream)
decoder_initialized(mpd_decoder, &audio_format,
input_stream->seekable,
- (float)data.stream_info.total_samples /
- (float)data.stream_info.sample_rate);
+ (float)data.total_frames /
+ (float)data.audio_format.sample_rate);
while (true) {
OggFLAC__seekable_stream_decoder_process_single(decoder);
@@ -313,7 +313,7 @@ oggflac_decode(struct decoder * mpd_decoder, struct input_stream *input_stream)
}
if (decoder_get_command(mpd_decoder) == DECODE_COMMAND_SEEK) {
FLAC__uint64 seek_sample = decoder_seek_where(mpd_decoder) *
- data.stream_info.sample_rate;
+ data.audio_format.sample_rate;
if (OggFLAC__seekable_stream_decoder_seek_absolute
(decoder, seek_sample)) {
data.next_frame = seek_sample;