avcodec/mediacodec_wrapper: fix false positives in swdec blacklist
authorStefan _ <sfan5@live.de>
Tue, 6 Mar 2018 22:19:36 +0000 (22:19 +0000)
committerMatthieu Bouron <matthieu.bouron@gmail.com>
Wed, 7 Mar 2018 12:52:02 +0000 (13:52 +0100)
'OMX.SEC.avc.dec' is a valid hardware decoder, while the decoders
we seek to blacklist all match 'OMX.SEC.*.sw.dec'.

libavcodec/mediacodec_wrapper.c

index 8381128..11d7f66 100644 (file)
@@ -473,7 +473,7 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
                 if (
                     strstr(name, "OMX.google") ||
                     strstr(name, "OMX.ffmpeg") ||
-                    strstr(name, "OMX.SEC") ||
+                    (strstr(name, "OMX.SEC") && strstr(name, ".sw.")) ||
                     !strcmp(name, "OMX.qcom.video.decoder.hevcswvdec")) {
                     av_freep(&name);
                     goto done_with_type;