mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-02 15:56:24 +00:00
Fix performance point check for Android M - P
This commit is contained in:
parent
d04e7a3231
commit
d4490f0e17
@ -128,8 +128,9 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
try {
|
||||
// We'll ask the decoder what it can do for us at this resolution and see if our
|
||||
// requested frame rate falls in the range of achievable frame rates.
|
||||
return caps.getAchievableFrameRatesFor(prefs.width, prefs.height).contains((double) prefs.fps);
|
||||
// requested frame rate falls below or inside the range of achievable frame rates.
|
||||
Range<Double> fpsRange = caps.getAchievableFrameRatesFor(prefs.width, prefs.height);
|
||||
return prefs.fps <= fpsRange.getUpper();
|
||||
} catch (IllegalArgumentException e) {
|
||||
// Video size not supported at any frame rate
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user