From 6999d1fbf1a00625e19d6a21db82c0ba7e241c89 Mon Sep 17 00:00:00 2001 From: Alex Hart Date: Fri, 28 Oct 2022 15:17:05 -0300 Subject: [PATCH] Enforce max gif playback using unreserved count from exo pool. --- .../securesms/giph/mp4/GiphyMp4PlaybackPolicy.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/giph/mp4/GiphyMp4PlaybackPolicy.java b/app/src/main/java/org/thoughtcrime/securesms/giph/mp4/GiphyMp4PlaybackPolicy.java index e2a5baf89..d9706a4a3 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/giph/mp4/GiphyMp4PlaybackPolicy.java +++ b/app/src/main/java/org/thoughtcrime/securesms/giph/mp4/GiphyMp4PlaybackPolicy.java @@ -25,10 +25,10 @@ public final class GiphyMp4PlaybackPolicy { } public static int maxSimultaneousPlaybackInSearchResults() { - return 12; + return ApplicationDependencies.getExoPlayerPool().getPoolStats().getMaxUnreserved(); } public static int maxSimultaneousPlaybackInConversation() { - return 4; + return ApplicationDependencies.getExoPlayerPool().getPoolStats().getMaxUnreserved() / 3; } }