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

Commit b889242a authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android (Google) Code Review
Browse files

Merge "Camera3Device: Correctly shut down abandoned streams" into nyc-dev

parents 098446ae ff51b47d
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -124,6 +124,7 @@ status_t Camera3IOStreamBase::disconnectLocked() {
    switch (mState) {
    switch (mState) {
        case STATE_IN_RECONFIG:
        case STATE_IN_RECONFIG:
        case STATE_CONFIGURED:
        case STATE_CONFIGURED:
        case STATE_ABANDONED:
            // OK
            // OK
            break;
            break;
        default:
        default:
+2 −2
Original line number Original line Diff line number Diff line
@@ -605,9 +605,9 @@ status_t Camera3OutputStream::detachBuffer(sp<GraphicBuffer>* buffer, int* fence
        *buffer = 0;
        *buffer = 0;
        ALOGW("%s: the released buffer has already been freed by the buffer queue!", __FUNCTION__);
        ALOGW("%s: the released buffer has already been freed by the buffer queue!", __FUNCTION__);
    } else if (res != OK) {
    } else if (res != OK) {
        // Other errors are fatal.
        // Treat other errors as abandonment
        ALOGE("%s: detach next buffer failed: %s (%d).", __FUNCTION__, strerror(-res), res);
        ALOGE("%s: detach next buffer failed: %s (%d).", __FUNCTION__, strerror(-res), res);
        mState = STATE_ERROR;
        mState = STATE_ABANDONED;
        return res;
        return res;
    }
    }