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

Commit b0f3bffd authored by Roman Kiryanov's avatar Roman Kiryanov Committed by Automerger Merge Worker
Browse files

Merge "Fix iterating over cameras in media profiles initialization" am: edce62eb

parents 050e9d90 edce62eb
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);