1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-09-28 07:08:23 +00:00

Merge pull request #1835 from ritiek/fix-res-crash

Fix crash with default resolution set to best and limited mobile data resolution
This commit is contained in:
Christian Schabesberger 2018-11-01 20:22:44 +01:00 committed by GitHub
commit 45fea983b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,8 @@ public final class ListHelper {
: context.getString(R.string.best_resolution_key); : context.getString(R.string.best_resolution_key);
String maxResolution = getResolutionLimit(context); String maxResolution = getResolutionLimit(context);
if (maxResolution != null && compareVideoStreamResolution(maxResolution, resolution) < 1){ if (maxResolution != null && (resolution.equals(context.getString(R.string.best_resolution_key))
|| compareVideoStreamResolution(maxResolution, resolution) < 1)) {
resolution = maxResolution; resolution = maxResolution;
} }
return resolution; return resolution;