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

Commit 69ce44d1 authored by Andy Hung's avatar Andy Hung
Browse files

Only read timestamps from HAL if not FastCapture

Prevents blocking FastCapture from the RecordThread

Bug: 29392543
Change-Id: Icd00534677be121bc4f4e9a7a6bd5b44f6f14f50
parent 9f639225
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -6237,7 +6237,8 @@ reacquire_wakelock:
        mTimestamp.mTimeNs[ExtendedTimestamp::LOCATION_SERVER] = systemTime();
        mTimestamp.mTimeNs[ExtendedTimestamp::LOCATION_SERVER] = systemTime();


        // Update server timestamp with kernel stats
        // Update server timestamp with kernel stats
        if (mInput->stream->get_capture_position != nullptr) {
        if (mInput->stream->get_capture_position != nullptr
                && mPipeSource.get() == nullptr /* don't obtain for FastCapture, could block */) {
            int64_t position, time;
            int64_t position, time;
            int ret = mInput->stream->get_capture_position(mInput->stream, &position, &time);
            int ret = mInput->stream->get_capture_position(mInput->stream, &position, &time);
            if (ret == NO_ERROR) {
            if (ret == NO_ERROR) {