Fix capabilities check for low frame-rate content

Issue: #6054
Issue: #474
PiperOrigin-RevId: 306437452
This commit is contained in:
olly 2020-04-14 15:52:18 +01:00 committed by Ian Baker
parent edc25ddc8d
commit 66f1c04445

View file

@ -547,7 +547,9 @@ public final class MediaCodecInfo {
width = alignedSize.x;
height = alignedSize.y;
if (frameRate == Format.NO_VALUE || frameRate <= 0) {
// VideoCapabilities.areSizeAndRateSupported incorrectly returns false if frameRate < 1 on some
// versions of Android, so we only check the size in this case [Internal ref: b/153940404].
if (frameRate == Format.NO_VALUE || frameRate < 1) {
return capabilities.isSizeSupported(width, height);
} else {
// The signaled frame rate may be slightly higher than the actual frame rate, so we take the