Skip to content

Commit

Permalink
fix: Use observed bitrate instead of encoder target when calculating …
Browse files Browse the repository at this point in the history
…probing needed.
  • Loading branch information
bgrozev committed Jan 14, 2025
1 parent 0397ec1 commit 6f53a5e
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,7 @@ class BitrateController<T : MediaSourceContainer> @JvmOverloads constructor(
val nowMs = clock.instant().toEpochMilli()
val allocation = bandwidthAllocator.allocation
allocation.allocations.forEach { singleAllocation ->
val allocationTargetBitrate: Bandwidth? = if (config.useVlaTargetBitrate) {
singleAllocation.targetLayer?.targetBitrate ?: singleAllocation.targetLayer?.getBitrate(nowMs)
} else {
singleAllocation.targetLayer?.getBitrate(nowMs)
}
val allocationTargetBitrate: Bandwidth? = singleAllocation.targetLayer?.getBitrate(nowMs)

allocationTargetBitrate?.let {
totalTargetBitrate += it
Expand Down

0 comments on commit 6f53a5e

Please sign in to comment.