diff options
author | Max Kellermann <max@duempel.org> | 2009-11-11 20:28:10 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-11-11 20:36:53 +0100 |
commit | 08b139f37c891b9b5f43f12910efda439add3f5b (patch) | |
tree | e4b9de9180d9428254c517227d93884d2e16087b /src/decoder/oggflac_plugin.c | |
parent | 3973aeecd2b4c91bd42ccc70155cebe8e2aedb8c (diff) | |
download | mpd-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/oggflac_plugin.c')
-rw-r--r-- | src/decoder/oggflac_plugin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/oggflac_plugin.c b/src/decoder/oggflac_plugin.c index 6d71c3ad3..14b832bdb 100644 --- a/src/decoder/oggflac_plugin.c +++ b/src/decoder/oggflac_plugin.c @@ -318,7 +318,7 @@ oggflac_decode(struct decoder * mpd_decoder, struct input_stream *input_stream) decoder_initialized(mpd_decoder, &data.audio_format, input_stream->seekable, (float)data.stream_info.total_samples / - (float)data.audio_format.sample_rate); + (float)data.stream_info.sample_rate); while (true) { OggFLAC__seekable_stream_decoder_process_single(decoder); @@ -328,7 +328,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.audio_format.sample_rate + 0.5; + data.stream_info.sample_rate; if (OggFLAC__seekable_stream_decoder_seek_absolute (decoder, seek_sample)) { data.next_frame = seek_sample; |