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

Commit d724fe04 authored by Jaideep Sharma's avatar Jaideep Sharma Committed by Automerger Merge Worker
Browse files

mp3dec: handle EOS with first frame am: b3737940

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/12104882

Change-Id: Ib23c40fdb43506efb601b0595af66900089c561c
parents c749e3aa b3737940
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -307,6 +307,20 @@ void SoftMP3::onQueueFilled(OMX_U32 /* portIndex */) {

            if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) {
                mSawInputEos = true;
                if (mIsFirst && !inHeader->nFilledLen) {
                     ALOGV("empty first EOS");
                     outHeader->nFilledLen = 0;
                     outHeader->nTimeStamp = inHeader->nTimeStamp;
                     outHeader->nFlags = OMX_BUFFERFLAG_EOS;
                     mSignalledOutputEos = true;
                     outInfo->mOwnedByUs = false;
                     outQueue.erase(outQueue.begin());
                     notifyFillBufferDone(outHeader);
                     inInfo->mOwnedByUs = false;
                     inQueue.erase(inQueue.begin());
                     notifyEmptyBufferDone(inHeader);
                     return;
                }
            }

            mConfig->pInputBuffer =