Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A potential bug by a wrong indexer #28

Open
lifove opened this issue Apr 17, 2017 · 0 comments
Open

A potential bug by a wrong indexer #28

lifove opened this issue Apr 17, 2017 · 0 comments

Comments

@lifove
Copy link

lifove commented Apr 17, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant