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

Commit d9355fe1 authored by Keith Mok's avatar Keith Mok
Browse files

Revert "nuplayer: Fix audio EOS notifiy on AudioSink not ready"

This patch is buggy, and causing notifyConsume not called
when the buffer is erased, causing audio discontinous cannot
resume properly. This patch is not in 8994 CAF also.

FEIJ-276

This reverts commit dc5f0eb0.

Change-Id: Idcb5ec9a419a979afe170d3a518ee7696a6fac6c
(cherry picked from commit 8436846a)
parent 3c8580b6
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -850,18 +850,6 @@ bool NuPlayer::Renderer::onDrainAudioQueue() {
    // immediately after start. Investigate error message
    // "vorbis_dsp_synthesis returned -135", along with RTSP.
    uint32_t numFramesPlayed;
    if(!mAudioSink->ready() && !mAudioQueue.empty()) {
        while (!mAudioQueue.empty()) {
            QueueEntry *entry = &*mAudioQueue.begin();
            if (entry->mBuffer == NULL) {
                notifyEOS(true /* audio */, entry->mFinalResult);
            }
            mAudioQueue.erase(mAudioQueue.begin());
            entry = NULL;
        }
        return false;
    }

    if (mAudioSink->getPosition(&numFramesPlayed) != OK) {
        // When getPosition fails, renderer will not reschedule the draining
        // unless new samples are queued.