When allocating bitrate, some parts of the coded directly uses the bitrate parameter, while others lets it be capped by VideoCodec.maxBitrate. This may result in an inconsistency between expected and actual number of temporal layers, causing a crash.
Even better would be to update VideoCodecInitializer to not create
VideoCodec instances where there's not enough maxBitrate to activate
all spatial layers - but that's a much more complex issue.
Bug: chromium:1423365
Change-Id: Ic74b68261ea6043f1795accdd9864319ab535435
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298041
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39593}