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

Commit d16cbe1e authored by Emilian Peev's avatar Emilian Peev Committed by android-build-merger
Browse files

Camera: Don't drop preview buffers during video

am: f20dd6b7

Change-Id: I4c57e0658ed72b8dd6462fcf5637119118c880bd
parents 040eaf1d f20dd6b7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -553,9 +553,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());
    }