Skip to content

Commit 02022b7

Browse files
Ronghua WuAndroid (Google) Code Review
authored andcommitted
Merge "media: fix estimateFrameRatesFor to use correct ratio" into mnc-dev
2 parents b310c89 + 4ef977c commit 02022b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

media/java/android/media/MediaCodecInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ private Size findClosestSize(int width, int height) {
12161216
private Range<Double> estimateFrameRatesFor(int width, int height) {
12171217
Size size = findClosestSize(width, height);
12181218
Range<Long> range = mMeasuredFrameRates.get(size);
1219-
Double ratio = (double)(width * height) / (size.getWidth() * size.getHeight());
1219+
Double ratio = (double)(size.getWidth() * size.getHeight()) / (width * height);
12201220
return Range.create(range.getLower() * ratio, range.getUpper() * ratio);
12211221
}
12221222

0 commit comments

Comments
 (0)