mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mediacodec_wrapper: check if codec is software earlier
This commit is contained in:
parent
c35e456f54
commit
1a033008e8
|
@ -441,22 +441,6 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
|
|||
goto done_with_info;
|
||||
}
|
||||
|
||||
type_count = (*env)->GetArrayLength(env, types);
|
||||
for (j = 0; j < type_count; j++) {
|
||||
int k;
|
||||
int profile_count;
|
||||
|
||||
type = (*env)->GetObjectArrayElement(env, types, j);
|
||||
if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
supported_type = ff_jni_jstring_to_utf_chars(env, type, log_ctx);
|
||||
if (!supported_type) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!av_strcasecmp(supported_type, mime)) {
|
||||
codec_name = (*env)->CallObjectMethod(env, info, jfields.get_name_id);
|
||||
if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
|
||||
goto done;
|
||||
|
@ -478,7 +462,25 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
|
|||
strstr(name, "OMX.ffmpeg") ||
|
||||
(strstr(name, "OMX.SEC") && strstr(name, ".sw.")) ||
|
||||
!strcmp(name, "OMX.qcom.video.decoder.hevcswvdec")) {
|
||||
av_freep(&name);
|
||||
goto done_with_info;
|
||||
}
|
||||
|
||||
type_count = (*env)->GetArrayLength(env, types);
|
||||
for (j = 0; j < type_count; j++) {
|
||||
int k;
|
||||
int profile_count;
|
||||
|
||||
type = (*env)->GetObjectArrayElement(env, types, j);
|
||||
if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
supported_type = ff_jni_jstring_to_utf_chars(env, type, log_ctx);
|
||||
if (!supported_type) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (av_strcasecmp(supported_type, mime)) {
|
||||
goto done_with_type;
|
||||
}
|
||||
|
||||
|
@ -525,7 +527,6 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
done_with_type:
|
||||
if (profile_levels) {
|
||||
|
@ -548,8 +549,6 @@ done_with_type:
|
|||
if (found_codec) {
|
||||
break;
|
||||
}
|
||||
|
||||
av_freep(&name);
|
||||
}
|
||||
|
||||
done_with_info:
|
||||
|
@ -566,6 +565,8 @@ done_with_info:
|
|||
if (found_codec) {
|
||||
break;
|
||||
}
|
||||
|
||||
av_freep(&name);
|
||||
}
|
||||
|
||||
done:
|
||||
|
|
Loading…
Reference in New Issue