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

Commit 7dc9b309 authored by Pannag Sanketi's avatar Pannag Sanketi
Browse files

Always set geometry in queuebuffer

The queuebuffer could return early due to timestamp issues. Need to set
the geometry even in that case.

Change-Id: I04d7cd1df3996d640c269285398c0042923ba920
parent 74a0a0d7
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -458,6 +458,10 @@ status_t SurfaceMediaSource::queueBuffer(int bufIndex, int64_t timestamp,
    LOGV("queueBuffer");

    Mutex::Autolock lock(mMutex);
    *outWidth = mDefaultWidth;
    *outHeight = mDefaultHeight;
    *outTransform = 0;

    if (bufIndex < 0 || bufIndex >= mBufferCount) {
        LOGE("queueBuffer: slot index out of range [0, %d]: %d",
                mBufferCount, bufIndex);
@@ -518,9 +522,6 @@ status_t SurfaceMediaSource::queueBuffer(int bufIndex, int64_t timestamp,
    // buffer is available
    onFrameReceivedLocked();

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

    return OK;
}