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

Commit 3eda271f authored by Dave Burke's avatar Dave Burke Committed by Android (Google) Code Review
Browse files

Merge "Clear the decoder input buffer after it signalled an error to be able...

Merge "Clear the decoder input buffer after it signalled an error to be able to continue." into jb-dev
parents 8dfa2282 e672a0ee
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ void SoftAAC2::initPorts() {

status_t SoftAAC2::initDecoder() {
    status_t status = UNKNOWN_ERROR;
    mAACDecoder = aacDecoder_Open(TT_MP4_RAW, /* num layers */ 1);
    mAACDecoder = aacDecoder_Open(TT_MP4_ADIF, /* num layers */ 1);
    if (mAACDecoder != NULL) {
        mStreamInfo = aacDecoder_GetStreamInfo(mAACDecoder);
        if (mStreamInfo != NULL) {
@@ -428,6 +428,8 @@ void SoftAAC2::onQueueFilled(OMX_U32 portIndex) {
            // Discard input buffer.
            inHeader->nFilledLen = 0;

            aacDecoder_SetParam(mAACDecoder, AAC_TPDEC_CLEAR_BUFFER, 1);

            // fall through
        }