am 02022b70: Merge "media: fix estimateFrameRatesFor to use correct ratio" into mnc-dev

* commit '02022b70bef7d6964bc8043385531d1aa97fb15b':
  media: fix estimateFrameRatesFor to use correct ratio
This commit is contained in:
Ronghua Wu
2015-07-29 01:00:50 +00:00
committed by Android Git Automerger

View File

@@ -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);
}