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

Commit ab23dc04 authored by James Dong's avatar James Dong Committed by Android (Google) Code Review
Browse files

Merge "Return ERROR_END_OF_STREAM when the input source reaches eos"

parents cebcdaef ba499b59
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -475,7 +475,9 @@ status_t AVCEncoder::read(
        }
        status_t err = mSource->read(&mInputBuffer, options);
        if (err != OK) {
            if (err != ERROR_END_OF_STREAM) {
                LOGE("Failed to read input video frame: %d", err);
            }
            outputBuffer->release();
            return err;
        }
+6 −3
Original line number Diff line number Diff line
@@ -398,10 +398,13 @@ status_t M4vH263Encoder::read(
    }

    // Ready for accepting an input video frame
    if (OK != mSource->read(&mInputBuffer, options)) {
    status_t err = mSource->read(&mInputBuffer, options);
    if (OK != err) {
        if (err != ERROR_END_OF_STREAM) {
            LOGE("Failed to read from data source");
        }
        outputBuffer->release();
        return UNKNOWN_ERROR;
        return err;
    }

    if (mInputBuffer->size() - ((mVideoWidth * mVideoHeight * 3) >> 1) != 0) {