mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-20 23:40:11 +00:00
Fix performance point check for Android M - P
This commit is contained in:
@@ -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