Skip to content

Commit

Permalink
Fix capabilities check for low frame-rate content
Browse files Browse the repository at this point in the history
Issue: #6054
Issue: #474
PiperOrigin-RevId: 306437452
  • Loading branch information
ojw28 committed May 27, 2020
1 parent 7d3f54a commit d538d6a
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -573,7 +573,9 @@ private static boolean areSizeAndRateSupportedV21(VideoCapabilities capabilities
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
Expand Down

0 comments on commit d538d6a

Please sign in to comment.