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

Commit 1cbe62c8 authored by Wei Jia's avatar Wei Jia
Browse files

NuPlayer: handle source error correctly.

Test: source error is sent to app.
Bug: 35025627
Change-Id: I668bab0de20cf24def028a6a467efceaed54af2b
(cherry picked from commit 231fd353)
parent 32efa2fd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -294,6 +294,9 @@ void NuPlayer::DecoderPassThrough::onInputBufferFetched(
            return;
        }

        if (streamErr != ERROR_END_OF_STREAM) {
            handleError(streamErr);
        }
        mReachedEOS = true;
        if (mRenderer != NULL) {
            mRenderer->queueEOS(true /* audio */, ERROR_END_OF_STREAM);
+2 −2
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ status_t MP3Source::read(
            buffer->release();
            buffer = NULL;

            return ERROR_END_OF_STREAM;
            return (n < 0 ? n : ERROR_END_OF_STREAM);
        }

        uint32_t header = U32_AT((const uint8_t *)buffer->data());
@@ -582,7 +582,7 @@ status_t MP3Source::read(
        buffer->release();
        buffer = NULL;

        return ERROR_END_OF_STREAM;
        return (n < 0 ? n : ERROR_END_OF_STREAM);
    }

    buffer->set_range(0, frame_size);