Commit 0c3fa2b0 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

mediacodec: don't try OMX.google.*

OMX.google.* are software decoders, it's better to use avcodec.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit 49fc0b18011e38bb1886bd15575e249ed1728977)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 1142c182
...@@ -406,7 +406,13 @@ static int OpenDecoder(vlc_object_t *p_this) ...@@ -406,7 +406,13 @@ static int OpenDecoder(vlc_object_t *p_this)
jobject types = (*env)->CallObjectMethod(env, info, p_sys->get_supported_types); jobject types = (*env)->CallObjectMethod(env, info, p_sys->get_supported_types);
int num_types = (*env)->GetArrayLength(env, 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; bool found = false;
if (!strncmp(name_ptr, "OMX.google.", __MIN(11, name_len)))
continue;
for (int j = 0; j < num_types && !found; j++) { for (int j = 0; j < num_types && !found; j++) {
jobject type = (*env)->GetObjectArrayElement(env, types, j); jobject type = (*env)->GetObjectArrayElement(env, types, j);
if (!jstrcmp(env, type, mime)) { if (!jstrcmp(env, type, mime)) {
...@@ -432,9 +438,6 @@ static int OpenDecoder(vlc_object_t *p_this) ...@@ -432,9 +438,6 @@ static int OpenDecoder(vlc_object_t *p_this)
(*env)->DeleteLocalRef(env, type); (*env)->DeleteLocalRef(env, type);
} }
if (found) { 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); msg_Dbg(p_dec, "using %.*s", name_len, name_ptr);
p_sys->name = malloc(name_len + 1); p_sys->name = malloc(name_len + 1);
memcpy(p_sys->name, name_ptr, name_len); memcpy(p_sys->name, name_ptr, name_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment