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

Commit 92a118e1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "mp3dec: Changes in the fillMainDataBuf function" into sc-dev am: 1f154d21

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If303fdecee036893185d9b7bbecc6c0d0cc04007
parents 48bae70d 1f154d21
Loading
Loading
Loading
Loading
+4 −17
Original line number Diff line number Diff line
@@ -598,18 +598,10 @@ void fillMainDataBuf(void *pMem, int32 temp)
        }
        else
        {
            int32 tmp1 = *(ptr++);
            for (int32 nBytes = temp >> 1; nBytes != 0; nBytes--)  /* read main data. */
            for (int32 nBytes = temp; nBytes != 0; nBytes--)  /* read main data. */
            {
                int32 tmp2 = *(ptr++);
                fillDataBuf(&pVars->mainDataStream, tmp1);
                fillDataBuf(&pVars->mainDataStream, tmp2);
                tmp1 = *(ptr++);
            }

            if (temp&1)
            {
                fillDataBuf(&pVars->mainDataStream, tmp1);
                int32 tmp = *(ptr++);
                fillDataBuf(&pVars->mainDataStream, tmp);
            }

            /* adjust circular buffer counter */
@@ -618,14 +610,9 @@ void fillMainDataBuf(void *pMem, int32 temp)
    }
    else
    {
        for (int32 nBytes = temp >> 1; nBytes != 0; nBytes--)  /* read main data. */
        for (int32 nBytes = temp; nBytes != 0; nBytes--)  /* read main data. */
        {
            fillDataBuf(&pVars->mainDataStream, *(pVars->inputStream.pBuffer + module(offset++  , BUFSIZE)));
            fillDataBuf(&pVars->mainDataStream, *(pVars->inputStream.pBuffer + module(offset++  , BUFSIZE)));
        }
        if (temp&1)
        {
            fillDataBuf(&pVars->mainDataStream, *(pVars->inputStream.pBuffer + module(offset  , BUFSIZE)));
        }
    }