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

Commit 18b22afe authored by Wonsik Kim's avatar Wonsik Kim Committed by android-build-merger
Browse files

Merge "nuplayer: handle error from MediaCodec in Decoder handleAnOutputBuffer" into mnc-dev

am: 7fad4bb2

Change-Id: I9d7c50eab930c2d6a3aadf9bc0685d6ccf870cb0
parents 0a8a0c44 7fad4bb2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -561,6 +561,11 @@ bool NuPlayer::Decoder::handleAnOutputBuffer(
    sp<ABuffer> buffer;
    mCodec->getOutputBuffer(index, &buffer);

    if (buffer == NULL) {
        handleError(UNKNOWN_ERROR);
        return false;
    }

    if (index >= mOutputBuffers.size()) {
        for (size_t i = mOutputBuffers.size(); i <= index; ++i) {
            mOutputBuffers.add();