mirror of
https://github.com/samsonjs/media.git
synced 2026-04-01 10:35:48 +00:00
Fix integer bitrate division
PiperOrigin-RevId: 237028164
This commit is contained in:
parent
155a129d2c
commit
dd06a2d5f1
1 changed files with 2 additions and 1 deletions
|
|
@ -352,7 +352,8 @@ public final class BufferSizeAdaptationBuilder {
|
|||
// buffer = slope * ln(bitrate) + intercept,
|
||||
// with buffer(minBitrate) = minBuffer and buffer(maxBitrate) = maxBuffer - hysteresisBuffer.
|
||||
bitrateToBufferFunctionSlope =
|
||||
(maxBufferUs - hysteresisBufferUs - minBufferUs) / Math.log(maxBitrate / minBitrate);
|
||||
(maxBufferUs - hysteresisBufferUs - minBufferUs)
|
||||
/ Math.log((double) maxBitrate / minBitrate);
|
||||
bitrateToBufferFunctionIntercept =
|
||||
minBufferUs - bitrateToBufferFunctionSlope * Math.log(minBitrate);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue