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

Commit 81a35203 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "C2SoftAomEnc: Fix onStop() implementation" into main

parents dbff6b4c 5d278695
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;
}