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

Commit d08f27ee authored by James Dong's avatar James Dong Committed by Android (Google) Code Review
Browse files

Merge "PV's mp3 decoder mistreated inputBufferCurrentLength in unit of bytes as in unit of bits"

parents 971ec7a6 c096a130
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -122,8 +122,10 @@ ERROR_CODE pvmp3_decode_header(tmp3Bits *inputStream,

    /*
     * Verify that at least the header is complete
     * Note that SYNC_WORD_LNGTH is in unit of bits, but inputBufferCurrentLength
     * is in unit of bytes.
     */
    if (inputStream->inputBufferCurrentLength < (SYNC_WORD_LNGTH + 21))
    if (inputStream->inputBufferCurrentLength < ((SYNC_WORD_LNGTH + 21) >> 3))
    {
        return NO_ENOUGH_MAIN_DATA_ERROR;
    }