diff options
author | Max Kellermann <max@duempel.org> | 2014-11-10 09:00:50 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-11-10 09:00:50 +0100 |
commit | 8ff0d99092acfe8e80eba9709c2e93727f9e47b9 (patch) | |
tree | 8137aba4f729d37fd8b05d51e0c05eb5c4dd5c93 | |
parent | 2e47cb12c4f1ee54f37ac2b72bfde23e864b3cbd (diff) | |
download | mpd-8ff0d99092acfe8e80eba9709c2e93727f9e47b9.tar.gz mpd-8ff0d99092acfe8e80eba9709c2e93727f9e47b9.tar.xz mpd-8ff0d99092acfe8e80eba9709c2e93727f9e47b9.zip |
decoder/audiofile: fix bit rate calculation
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/decoder/plugins/AudiofileDecoderPlugin.cxx | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -7,6 +7,7 @@ ver 0.19.3 (not yet released) - curl: another fix for redirected streams * decoder - audiofile: fix crash while playing streams + - audiofile: fix bit rate calculation - ffmpeg: support opus ver 0.19.2 (2014/11/02) diff --git a/src/decoder/plugins/AudiofileDecoderPlugin.cxx b/src/decoder/plugins/AudiofileDecoderPlugin.cxx index 4b347817e..a0ef71e49 100644 --- a/src/decoder/plugins/AudiofileDecoderPlugin.cxx +++ b/src/decoder/plugins/AudiofileDecoderPlugin.cxx @@ -209,7 +209,7 @@ audiofile_stream_decode(Decoder &decoder, InputStream &is) const auto total_time = audiofile_get_duration(fh); const uint16_t kbit_rate = (uint16_t) - (is.GetSize() * uint64_t(8000) / total_time.ToMS()); + (is.GetSize() * uint64_t(8) / total_time.ToMS()); const unsigned frame_size = (unsigned) afGetVirtualFrameSize(fh, AF_DEFAULT_TRACK, true); |