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

Commit 6a04b9de authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "C2SoftAomEnc: Fix onStop() implementation" into main am: 81a35203 am: 0eaa372e

parents 95521d45 0eaa372e
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -338,6 +338,19 @@ c2_status_t C2SoftAomEnc::onInit() {
}

c2_status_t C2SoftAomEnc::onStop() {
    IntfImpl::Lock lock = mIntf->lock();
    std::shared_ptr<C2StreamRequestSyncFrameTuning::output> requestSync = mIntf->getRequestSync_l();
    lock.unlock();
    if (requestSync != mRequestSync) {
        // we can handle IDR immediately
        if (requestSync->value) {
            // unset request
            C2StreamRequestSyncFrameTuning::output clearSync(0u, C2_FALSE);
            std::vector<std::unique_ptr<C2SettingResult>> failures;
            mIntf->config({ &clearSync }, C2_MAY_BLOCK, &failures);
        }
        mRequestSync = requestSync;
    }
    onRelease();
    return C2_OK;
}