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

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

Merge "Add check preventing div0 issue"

am: 17771551

Change-Id: I43ae194696efe663530e32f41233d9843ca04ff1
parents af64986c 17771551
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;