Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c045169e authored by Robert Shih's avatar Robert Shih Committed by android-build-merger
Browse files

Merge "LiveSession: fix getBandwidthIndex mul overflow" into qt-dev

am: ca4cd816

Change-Id: Id01a1e02b72066ff599b55a074f290d7cbe010aa
parents 1352b03b ca4cd816
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1384,7 +1384,7 @@ size_t LiveSession::getBandwidthIndex(int32_t bandwidthBps) {
        while (index > lowestBandwidth) {
            // be conservative (70%) to avoid overestimating and immediately
            // switching down again.
            size_t adjustedBandwidthBps = bandwidthBps * 7 / 10;
            size_t adjustedBandwidthBps = bandwidthBps * .7f;
            const BandwidthItem &item = mBandwidthItems[index];
            if (item.mBandwidth <= adjustedBandwidthBps
                    && isBandwidthValid(item)) {