summaryrefslogtreecommitdiffstats
path: root/DOCS/client-api-changes.rst
diff options
context:
space:
mode:
authorStefan Pöschel <github@basicmaster.de>2019-01-19 22:51:38 +0100
committerwm4 <1387750+wm4@users.noreply.github.com>2019-09-26 11:53:42 +0200
commit3ee6d7db4e2e61465d18db05a8346086ffa0884b (patch)
tree2f01f56df77c09603645a36100965977d2486936 /DOCS/client-api-changes.rst
parent41f290f54e385f28257bd24e8f399bcb7f3727b7 (diff)
downloadmpv-3ee6d7db4e2e61465d18db05a8346086ffa0884b.tar.bz2
mpv-3ee6d7db4e2e61465d18db05a8346086ffa0884b.tar.xz
command: fix bitrate rounding error
When the (float) bitrate is returned, it is implicitely converted to an int64 value, merely discarding the fractional part. However the bitrate of a CBR track can vary a bit due to timestamp precision loss after clock conversion (this can affect MPEG-TS audio tracks). So a bitrate like 191999.999... results in 191999 when being returned - instead of 192000. To fix this, apply proper rounding, as already done for the "old" case. Hereby refactoring the "old" case to also use `llrint`.
Diffstat (limited to 'DOCS/client-api-changes.rst')
0 files changed, 0 insertions, 0 deletions