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

Commit fcd58351 authored by Zhijun He's avatar Zhijun He Committed by Android (Google) Code Review
Browse files

Merge "Camera2/3: Don't release recording buffer when stream is active"

parents 50468413 60800208
Loading
Loading
Loading
Loading
+7 −4
Original line number Original line Diff line number Diff line
@@ -430,10 +430,13 @@ status_t StreamingProcessor::startStream(StreamType type,


    Mutex::Autolock m(mMutex);
    Mutex::Autolock m(mMutex);


    // If a recording stream is being started up, free up any
    // If a recording stream is being started up and no recording
    // outstanding buffers left from the previous recording session.
    // stream is active yet, free up any outstanding buffers left
    // There should never be any, so if there are, warn about it.
    // from the previous recording session. There should never be
    if (isStreamActive(outputStreams, mRecordingStreamId)) {
    // any, so if there are, warn about it.
    bool isRecordingStreamIdle = !isStreamActive(mActiveStreamIds, mRecordingStreamId);
    bool startRecordingStream = isStreamActive(outputStreams, mRecordingStreamId);
    if (startRecordingStream && isRecordingStreamIdle) {
        releaseAllRecordingFramesLocked();
        releaseAllRecordingFramesLocked();
    }
    }