Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8ddd91d authored by Toni Heidenreich's avatar Toni Heidenreich Committed by Android (Google) Code Review
Browse files

Merge "Remove level check from codec support check"

parents 6ff04c29 093cf050
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -511,8 +511,6 @@ bool MediaCodecList::codecHandlesFormat(const char *mime, sp<MediaCodecInfo> inf

        int32_t profile = -1;
        if (format->findInt32("profile", &profile)) {
            int32_t level = -1;
            format->findInt32("level", &level);
            Vector<MediaCodecInfo::ProfileLevel> profileLevels;
            capabilities->getSupportedProfileLevels(&profileLevels);
            auto it = profileLevels.begin();
@@ -520,14 +518,11 @@ bool MediaCodecList::codecHandlesFormat(const char *mime, sp<MediaCodecInfo> inf
                if (profile != it->mProfile) {
                    continue;
                }
                if (level > -1 && level > it->mLevel) {
                    continue;
                }
                break;
            }

            if (it == profileLevels.end()) {
                ALOGV("Codec does not support profile %d with level %d", profile, level);
                ALOGV("Codec does not support profile %d", profile);
                return false;
            }
        }