Skip to content

Commit c85b97a

Browse files
authored
Fix: fragmentSize is below the minimum (#6238)
noticed logs " CacheDataSink: fragmentSize is below the minimum recommended value of 2097152. This may cause poor cache performance. this fixes the issue by using ExoPlayers MIN_RECOMMENDED_FRAGMENT_SIZE. Unfortunately that field is private: https://github.com/google/ExoPlayer/blob/aeb306a164911aa1491b46c2db4da0d329c83c65/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSink.java#L123
1 parent c7510c6 commit c85b97a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public static long getPreferredCacheSize() {
297297
}
298298

299299
public static long getPreferredFileSize() {
300-
return 512 * 1024L;
300+
return 2 * 1024 * 1024L; // ExoPlayer CacheDataSink.MIN_RECOMMENDED_FRAGMENT_SIZE
301301
}
302302

303303
/**

0 commit comments

Comments
 (0)