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

Commit 4ef977c0 authored by Ronghua Wu's avatar Ronghua Wu
Browse files

media: fix estimateFrameRatesFor to use correct ratio

Bug: 22504214
Change-Id: I5a325ae495b76aadd3fcbb8932d865c2f6322b2a
parent a7bdace2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1216,7 +1216,7 @@ public final class MediaCodecInfo {
        private Range<Double> estimateFrameRatesFor(int width, int height) {
            Size size = findClosestSize(width, height);
            Range<Long> range = mMeasuredFrameRates.get(size);
            Double ratio = (double)(width * height) / (size.getWidth() * size.getHeight());
            Double ratio = (double)(size.getWidth() * size.getHeight()) / (width * height);
            return Range.create(range.getLower() * ratio, range.getUpper() * ratio);
        }