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