mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-09-11 08:46:34 +02:00
fix: crash when buffer value is less than 1
This commit is contained in:
parent
5ff47b7fcc
commit
e2d962355c
@ -5,15 +5,21 @@ import app.revanced.integrations.settings.SettingsEnum;
|
||||
public class VideoBufferPatch {
|
||||
|
||||
public static int getMaxBuffer() {
|
||||
return SettingsEnum.MAX_BUFFER_INTEGER.getInt();
|
||||
int confVal = SettingsEnum.MAX_BUFFER_INTEGER.getInt();
|
||||
if (confVal < 1) confVal = 1;
|
||||
return confVal;
|
||||
}
|
||||
|
||||
public static int getPlaybackBuffer() {
|
||||
return SettingsEnum.PLAYBACK_MAX_BUFFER_INTEGER.getInt();
|
||||
int confVal = SettingsEnum.PLAYBACK_MAX_BUFFER_INTEGER.getInt();
|
||||
if (confVal < 1) confVal = 1;
|
||||
return confVal;
|
||||
}
|
||||
|
||||
public static int getReBuffer() {
|
||||
return SettingsEnum.MAX_PLAYBACK_BUFFER_AFTER_REBUFFER_INTEGER.getInt();
|
||||
int confVal = SettingsEnum.MAX_PLAYBACK_BUFFER_AFTER_REBUFFER_INTEGER.getInt();
|
||||
if (confVal < 1) confVal = 1;
|
||||
return confVal;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user