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

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

Merge "Fix both H.263 and MPEG4 decoders." into jb-dev

parents 1d02a827 02accddf
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -420,12 +420,11 @@ void SoftMPEG4::onQueueFilled(OMX_U32 portIndex) {
            useExtTimestamp ? (inHeader->nTimeStamp + 500) / 1000 : 0xFFFFFFFF;

        int32_t bufferSize = inHeader->nFilledLen;
        int32_t tmp = bufferSize;

        // The PV decoder is lying to us, sometimes it'll claim to only have
        // consumed a subset of the buffer when it clearly consumed all of it.
        // ignore whatever it says...
        int32_t tmp = bufferSize;

        if (PVDecodeVideoFrame(
                    mHandle, &bitstream, &timestamp, &tmp,
                    &useExtTimestamp,
@@ -444,9 +443,8 @@ void SoftMPEG4::onQueueFilled(OMX_U32 portIndex) {
        // decoder deals in ms, OMX in us.
        outHeader->nTimeStamp = timestamp * 1000;

        CHECK_LE(bufferSize, inHeader->nFilledLen);
        inHeader->nOffset += inHeader->nFilledLen - bufferSize;
        inHeader->nFilledLen = bufferSize;
        inHeader->nOffset += bufferSize;
        inHeader->nFilledLen = 0;

        if (inHeader->nFilledLen == 0) {
            inInfo->mOwnedByUs = false;