mirror of
https://github.com/jellyfin/jellyfin-androidtv.git
synced 2026-10-26 16:45:23 +00:00
Add additional null checks to PlaybackController.findBestDisplayMode
This commit is contained in:
1 parent
5c26dafb0b
commit
4f97f16338
1 file changed
+3
-3
@@ -289,11 +289,11 @@ public class PlaybackController implements PlaybackControllerNotifiable {
|
||||
}
|
||||
}
|
||||
|
||||
private Display.Mode findBestDisplayMode(MediaStream videoStream) {
|
||||
if (mFragment == null || mDisplayModes == null || videoStream.getRealFrameRate() == null)
|
||||
@Nullable
|
||||
private Display.Mode findBestDisplayMode(@Nullable MediaStream videoStream) {
|
||||
if (mFragment == null || mDisplayModes == null || videoStream == null || videoStream.getRealFrameRate() == null || videoStream.getWidth() == null || videoStream.getHeight() == null)
|
||||
return null;
|
||||
|
||||
|
||||
int curWeight = 0;
|
||||
Display.Mode bestMode = null;
|
||||
int sourceRate = Math.round(videoStream.getRealFrameRate() * 100);
|
||||
|
||||
Reference in new issue
Block a user