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

Commit ac75b045 authored by Ryszard Grzesica's avatar Ryszard Grzesica Committed by android-build-merger
Browse files

Merge "Add check preventing div0 issue" am: 17771551

am: f52dc315

Change-Id: I2680737acc0f3166f90a1f5d1f190d9f726b3d29
parents 04c8cb77 f52dc315
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -129,6 +129,11 @@ bool VideoFrameScheduler::PLL::fit(
        numSamplesToUse = mNumSamples;
    }

    if ((period >> kPrecision) == 0 ) {
        ALOGW("Period is 0, or after including precision is 0 - would cause div0, returning");
        return false;
    }

    int64_t sumX = 0;
    int64_t sumXX = 0;
    int64_t sumXY = 0;