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

Commit 0cdd9a51 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "audio: Fix MonoPipe ownership in StreamRemoteSubmix" into main

parents 5b71490d b9a69e22
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -283,6 +283,15 @@ size_t StreamRemoteSubmix::getStreamPipeSizeInFrames() {
        }
        return ::android::OK;
    }
    // get and hold the sink because 'MonoPipeReader' does not hold a strong pointer to it.
    sp<MonoPipe> sink = mCurrentRoute->getSink();
    if (sink == nullptr) {
        if (++mReadErrorCount < kMaxErrorLogs) {
            LOG(ERROR) << __func__
                       << ": the sink has been released! (not all errors will be logged)";
        }
        return ::android::OK;
    }
    mReadErrorCount = 0;

    LOG(VERBOSE) << __func__ << ": " << mDeviceAddress.toString() << ", " << frameCount