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

Commit ef3d158d authored by Greg Hackmann's avatar Greg Hackmann
Browse files

SurfaceMediaSource: wait on fence from acquired buffers



Change-Id: I4ab93a4adeec536648258c70a7d943503d9b10f4
Signed-off-by: default avatarGreg Hackmann <ghackmann@google.com>
parent 6b3efc8b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -298,6 +298,10 @@ status_t SurfaceMediaSource::read( MediaBuffer **buffer,
            // wait for a buffer to be queued
            mFrameAvailableCondition.wait(mMutex);
        } else if (err == OK) {
            err = item.mFence->waitForever(1000, "SurfaceMediaSource::read");
            if (err) {
                ALOGW("read: failed to wait for buffer fence: %d", err);
            }

            // First time seeing the buffer?  Added it to the SMS slot
            if (item.mGraphicBuffer != NULL) {