Commit 0e6be4c7 authored by Sylvain Berfini's avatar Sylvain Berfini
Browse files

Fix NPE on some Android devices

parent 2a607212
......@@ -126,6 +126,10 @@ public class AndroidVideoApi9JniWrapper {
private static int[] findClosestEnclosingFpsRange(int expectedFps, List<int[]> fpsRanges) {
Log.d("Searching for closest fps range from " + expectedFps);
if (fpsRanges == null || fpsRanges.size() == 0) {
return new int[] { 0, 0 };
}
// init with first element
int[] closestRange = fpsRanges.get(0);
int measure = Math.abs(closestRange[0] - expectedFps)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment