fyhertz / spydroid-ipcamera

A powerful and funny android app. that streams the camera and microphone of your phone to your browser or to VLC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A potential bug by a wrong indexer

lifove opened this issue · comments

commented

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!