diff options
Diffstat (limited to 'src/decoder/flac_decoder_plugin.c')
-rw-r--r-- | src/decoder/flac_decoder_plugin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/flac_decoder_plugin.c b/src/decoder/flac_decoder_plugin.c index 65cccfb60..1a81e3fd4 100644 --- a/src/decoder/flac_decoder_plugin.c +++ b/src/decoder/flac_decoder_plugin.c @@ -251,12 +251,12 @@ flac_decoder_initialize(struct flac_data *data, FLAC__StreamDecoder *sd, return false; if (duration == 0) - duration = data->stream_info.total_samples; + duration = data->total_frames; decoder_initialized(data->decoder, &audio_format, seekable, (float)duration / - (float)data->stream_info.sample_rate); + (float)data->audio_format.sample_rate); return true; } @@ -281,7 +281,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->stream_info.sample_rate; + data->audio_format.sample_rate; if (seek_sample >= t_start && (t_end == 0 || seek_sample <= t_end) && FLAC__stream_decoder_seek_absolute(flac_dec, seek_sample)) { |