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

Commit 7fad4bb2 authored by Wonsik Kim's avatar Wonsik Kim Committed by Android (Google) Code Review
Browse files

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

parents e472e511 065e229f
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();