lavc/mediacodec_wrapper: do not discard codecs reporting they do not support any...
authorMatthieu Bouron <matthieu.bouron@stupeflix.com>
Fri, 7 Oct 2016 09:20:33 +0000 (11:20 +0200)
committerMatthieu Bouron <matthieu.bouron@stupeflix.com>
Wed, 19 Oct 2016 07:52:15 +0000 (09:52 +0200)
Depending on the device, some (VP8/VP9/...) decoders report that they do
not support any profiles.

libavcodec/mediacodec_wrapper.c

index 97e3a29..c2af950 100644 (file)
@@ -480,6 +480,9 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
                 }
 
                 profile_count = (*env)->GetArrayLength(env, profile_levels);
+                if (!profile_count) {
+                    found_codec = 1;
+                }
                 for (k = 0; k < profile_count; k++) {
                     int supported_profile = 0;