decoder/audiofile: fix bit rate calculation
This commit is contained in:
parent
2e47cb12c4
commit
8ff0d99092
1
NEWS
1
NEWS
|
@ -7,6 +7,7 @@ ver 0.19.3 (not yet released)
|
||||||
- curl: another fix for redirected streams
|
- curl: another fix for redirected streams
|
||||||
* decoder
|
* decoder
|
||||||
- audiofile: fix crash while playing streams
|
- audiofile: fix crash while playing streams
|
||||||
|
- audiofile: fix bit rate calculation
|
||||||
- ffmpeg: support opus
|
- ffmpeg: support opus
|
||||||
|
|
||||||
ver 0.19.2 (2014/11/02)
|
ver 0.19.2 (2014/11/02)
|
||||||
|
|
|
@ -209,7 +209,7 @@ audiofile_stream_decode(Decoder &decoder, InputStream &is)
|
||||||
const auto total_time = audiofile_get_duration(fh);
|
const auto total_time = audiofile_get_duration(fh);
|
||||||
|
|
||||||
const uint16_t kbit_rate = (uint16_t)
|
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)
|
const unsigned frame_size = (unsigned)
|
||||||
afGetVirtualFrameSize(fh, AF_DEFAULT_TRACK, true);
|
afGetVirtualFrameSize(fh, AF_DEFAULT_TRACK, true);
|
||||||
|
|
Loading…
Reference in New Issue