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

Commit b3737940 authored by Jaideep Sharma's avatar Jaideep Sharma Committed by Ray Essick
Browse files

mp3dec: handle EOS with first frame

handle EOS with first frame.

Bug: 156203931
Test: android.mediav2.cts.CodecDecoderTest#testOnlyEos[audio/mpeg]

Change-Id: I3efdea14409cf4a17aa4512c70d5c0e5992a3ab6
parent 9ce151cc
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 =