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

Commit edce62eb authored by Roman Kiryanov's avatar Roman Kiryanov Committed by Gerrit Code Review
Browse files

Merge "Fix iterating over cameras in media profiles initialization"

parents aca1a6f7 fb42ae81
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -898,10 +898,9 @@ void MediaProfiles::checkAndAddRequiredProfilesIfNecessary() {
        }
    }

    for (size_t cameraId = 0; cameraId < mCameraIds.size(); ++cameraId) {
    for (size_t refIndex = 0; refIndex < mCameraIds.size(); ++refIndex) {
        const int cameraId = mCameraIds[refIndex];
        for (size_t j = 0; j < kNumRequiredProfiles; ++j) {
            int refIndex = getRequiredProfileRefIndex(cameraId);
            CHECK(refIndex != -1);
            RequiredProfileRefInfo *info =
                    &mRequiredProfileRefs[refIndex].mRefs[j];

@@ -931,14 +930,14 @@ void MediaProfiles::checkAndAddRequiredProfilesIfNecessary() {

                int index = getCamcorderProfileIndex(cameraId, profile->mQuality);
                if (index != -1) {
                    ALOGV("Profile quality %d for camera %zu already exists",
                    ALOGV("Profile quality %d for camera %d already exists",
                        profile->mQuality, cameraId);
                    CHECK(index == refIndex);
                    continue;
                }

                // Insert the new profile
                ALOGV("Add a profile: quality %d=>%d for camera %zu",
                ALOGV("Add a profile: quality %d=>%d for camera %d",
                        mCamcorderProfiles[info->mRefProfileIndex]->mQuality,
                        profile->mQuality, cameraId);