From 2a09047e86bf7c38d00bbde15cde35be4b15228e Mon Sep 17 00:00:00 2001 From: Marcel Dopita Date: Sat, 21 Dec 2024 22:05:20 +0100 Subject: [PATCH] Lower number of samples for frame rate detection --- app/src/main/java/com/brouken/player/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/brouken/player/Utils.java b/app/src/main/java/com/brouken/player/Utils.java index 160c65fe..7630dc3d 100644 --- a/app/src/main/java/com/brouken/player/Utils.java +++ b/app/src/main/java/com/brouken/player/Utils.java @@ -800,7 +800,7 @@ public static float getFrameRate(Context context, Uri videoUri) { String mimeType = format.getString(MediaFormat.KEY_MIME); if (mimeType != null && mimeType.startsWith("video/")) { mediaExtractor.selectTrack(i); - while (timestamps.size() < 1000 + ignoreSamples) { + while (timestamps.size() < 350 + ignoreSamples) { long timestamp = mediaExtractor.getSampleTime(); if (timestamp < 0) { break;