[vlc-commits] mediacodec: don't try OMX.google.*
Thomas Guillem
git at videolan.org
Thu Nov 20 19:45:18 CET 2014
vlc/vlc-2.2 | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Nov 18 10:16:35 2014 +0000| [0c3fa2b011821ada786857dc02d8997fca091553] | committer: Jean-Baptiste Kempf
mediacodec: don't try OMX.google.*
OMX.google.* are software decoders, it's better to use avcodec.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 49fc0b18011e38bb1886bd15575e249ed1728977)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=0c3fa2b011821ada786857dc02d8997fca091553
---
modules/codec/omxil/android_mediacodec.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/codec/omxil/android_mediacodec.c b/modules/codec/omxil/android_mediacodec.c
index bc8262b..e4ea6fe 100644
--- a/modules/codec/omxil/android_mediacodec.c
+++ b/modules/codec/omxil/android_mediacodec.c
@@ -406,7 +406,13 @@ static int OpenDecoder(vlc_object_t *p_this)
jobject types = (*env)->CallObjectMethod(env, info, p_sys->get_supported_types);
int num_types = (*env)->GetArrayLength(env, types);
+ jobject name = (*env)->CallObjectMethod(env, info, p_sys->get_name);
+ jsize name_len = (*env)->GetStringUTFLength(env, name);
+ const char *name_ptr = (*env)->GetStringUTFChars(env, name, NULL);
bool found = false;
+
+ if (!strncmp(name_ptr, "OMX.google.", __MIN(11, name_len)))
+ continue;
for (int j = 0; j < num_types && !found; j++) {
jobject type = (*env)->GetObjectArrayElement(env, types, j);
if (!jstrcmp(env, type, mime)) {
@@ -432,9 +438,6 @@ static int OpenDecoder(vlc_object_t *p_this)
(*env)->DeleteLocalRef(env, type);
}
if (found) {
- jobject name = (*env)->CallObjectMethod(env, info, p_sys->get_name);
- jsize name_len = (*env)->GetStringUTFLength(env, name);
- const char *name_ptr = (*env)->GetStringUTFChars(env, name, NULL);
msg_Dbg(p_dec, "using %.*s", name_len, name_ptr);
p_sys->name = malloc(name_len + 1);
memcpy(p_sys->name, name_ptr, name_len);
More information about the vlc-commits
mailing list