From 2a737eecc1ec1aee0240bf0dce9dee476f6fae70 Mon Sep 17 00:00:00 2001 From: tonihei Date: Thu, 8 Mar 2018 08:27:07 -0800 Subject: [PATCH] Update default max buffer in DefaultLoadControl. The value is increased to 50 seconds. With that the player can better handle short network problems. This does NOT increase the maximum memory used as we still apply the seperate DEFAULT_TARGET_BUFFER_BYTES. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=188335603 --- RELEASENOTES.md | 1 + .../java/com/google/android/exoplayer2/DefaultLoadControl.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index c636de1b6b..2eae5f5902 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -4,6 +4,7 @@ * Moved initial bitrate estimate from `AdaptiveTrackSelection` to `DefaultBandwidthMeter`. +* Updated default max buffer length in `DefaultLoadControl`. * UI components: * Add support for listening to `AspectRatioFrameLayout`'s aspect ratio update ([#3736](https://github.com/google/ExoPlayer/issues/3736)). diff --git a/library/core/src/main/java/com/google/android/exoplayer2/DefaultLoadControl.java b/library/core/src/main/java/com/google/android/exoplayer2/DefaultLoadControl.java index a4bbac6b63..e3ef6f9724 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/DefaultLoadControl.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/DefaultLoadControl.java @@ -37,7 +37,7 @@ public class DefaultLoadControl implements LoadControl { /** * The default maximum duration of media that the player will attempt to buffer, in milliseconds. */ - public static final int DEFAULT_MAX_BUFFER_MS = 30000; + public static final int DEFAULT_MAX_BUFFER_MS = 50000; /** * The default duration of media that must be buffered for playback to start or resume following a