Ensure MediaCodecHelper is initialized before evaluating codecs

This commit is contained in:
Cameron Gutman
2017-11-21 19:27:08 -08:00
parent a56689aea3
commit bfa5a6349e
2 changed files with 19 additions and 0 deletions

View File

@@ -134,6 +134,10 @@ public class StreamSettings extends Activity {
}
}
// This must be called to do runtime initialization before calling functions that evaluate
// decoder lists.
MediaCodecHelper.initialize(getContext(), GlPreferences.readPreferences(getContext()).glRenderer);
MediaCodecInfo avcDecoder = MediaCodecHelper.findProbableSafeDecoder("video/avc", -1);
MediaCodecInfo hevcDecoder = MediaCodecHelper.findProbableSafeDecoder("video/hevc", -1);