A potential bug by a wrong indexer
lifove opened this issue · comments
Hi
In a recent code snapshot, I've found a following suspicious code in src/net/majorkernelpanic/streaming/video/CodecManager.java
157 for (int i = 0; i < types.length; i++) {
158 if (types[i].equalsIgnoreCase(mimeType)) {
159 MediaCodecInfo.CodecCapabilities capabilities = codecInfo.getCapabilitiesForType(mimeType);
160
161 boolean software = false;
162 for (int k=0;k<SOFTWARE_ENCODERS.length;k++) {
163 if (codecInfo.getName().equalsIgnoreCase(SOFTWARE_ENCODERS[i])) {
164 software = true;
165 }
166 }
Currently, SOFTWARE_ENCODERS has only one value, so it might not be an issue if the length of types are not > 1. But wanted to report just in case. Thanks!