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

Commit 0a0c0278 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Camera: Don't drop preview buffers during video"

parents 8c6dd4e4 6c79c9aa
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -551,9 +551,11 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardCapture(
        return DONE;
    }

    if (l.mParameters.isDeviceZslSupported) {
    if ((l.mParameters.isDeviceZslSupported) && (l.mParameters.state != Parameters::RECORD) &&
            (l.mParameters.state != Parameters::VIDEO_SNAPSHOT)) {
        // If device ZSL is supported, drop all pending preview buffers to reduce the chance of
        // rendering preview frames newer than the still frame.
        // Additionally, preview must not get interrupted during video recording.
        client->getCameraDevice()->dropStreamBuffers(true, client->getPreviewStreamId());
    }