diff options
author | Max Kellermann <max@duempel.org> | 2010-03-17 18:26:36 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-03-17 18:26:36 +0100 |
commit | 68017b12541f6ab924447afab927bae8b58cfdec (patch) | |
tree | 548b70554d9e3cc4a8b3f7fc603b30e713f8b0cf /src/decoder_api.c | |
parent | 469c9b5def450dbc50a71077df75f239cee7f4fa (diff) | |
download | mpd-68017b12541f6ab924447afab927bae8b58cfdec.tar.gz mpd-68017b12541f6ab924447afab927bae8b58cfdec.tar.xz mpd-68017b12541f6ab924447afab927bae8b58cfdec.zip |
decoder_api: use the correct format to calculate elapsed time
When decoder->timestamp is calculated, the PCM data is already
converted to out_audio_format; using in_audio_format may cause funny
speedups/slowdowns.
Diffstat (limited to 'src/decoder_api.c')
-rw-r--r-- | src/decoder_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c index 285e21a6b..fc7ed3900 100644 --- a/src/decoder_api.c +++ b/src/decoder_api.c @@ -354,7 +354,7 @@ decoder_data(struct decoder *decoder, length -= nbytes; decoder->timestamp += (double)nbytes / - audio_format_time_to_size(&dc->in_audio_format); + audio_format_time_to_size(&dc->out_audio_format); if (dc->song->end_ms > 0 && decoder->timestamp >= dc->song->end_ms / 1000.0) |