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

Commit fcdafba0 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android (Google) Code Review
Browse files

Merge "fix a small race condition when returning the default width/height of a SurfaceTexture"

parents 8e044f11 3902be62
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -482,17 +482,16 @@ status_t SurfaceTexture::queueBuffer(int buf, int64_t timestamp,
        mSlots[buf].mScalingMode = mNextScalingMode;
        mSlots[buf].mTimestamp = timestamp;
        mDequeueCondition.signal();

        *outWidth = mDefaultWidth;
        *outHeight = mDefaultHeight;
        *outTransform = 0;
    } // scope for the lock

    // call back without lock held
    if (listener != 0) {
        listener->onFrameAvailable();
    }

    *outWidth = mDefaultWidth;
    *outHeight = mDefaultHeight;
    *outTransform = 0;

    return OK;
}