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

Commit 0d7da000 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Fix avc software decoder to properly handle SEI nalType and access unit delimiter."

parents 7d3cbfe2 6be8b14e
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -262,6 +262,8 @@ status_t AVCDecoder::read(
                &nalType, &nalRefIdc);

    if (res != AVCDEC_SUCCESS) {
        LOGE("cannot determine nal type");

        mInputBuffer->release();
        mInputBuffer = NULL;

@@ -375,18 +377,19 @@ status_t AVCDecoder::read(
            mInputBuffer->release();
            mInputBuffer = NULL;

            if (res == AVCDEC_PICTURE_READY) {
            if (res == AVCDEC_PICTURE_READY || res == AVCDEC_SUCCESS) {
                *out = new MediaBuffer(0);

                return OK;
            } else {
                LOGE("failed to decode frame (res = %d)", res);
                return UNKNOWN_ERROR;
            }
        }

        case AVC_NALTYPE_SEI:
        {
            res = PVAVCDecodeSlice(
            res = PVAVCDecSEI(
                    mHandle, const_cast<uint8_t *>(inPtr),
                    mInputBuffer->range_length());

@@ -404,6 +407,9 @@ status_t AVCDecoder::read(

        case AVC_NALTYPE_AUD:
        {
            mInputBuffer->release();
            mInputBuffer = NULL;

            *out = new MediaBuffer(0);

            return OK;