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

Commit 9e7ed331 authored by Wei Jia's avatar Wei Jia
Browse files

mediaplayer: flush audio sink when renderer is flushed.

Bug: 17488729
Change-Id: Ie56018367cb6aec1749ca148e94173e6c5864b27
parent 457e8258
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1087,6 +1087,16 @@ void NuPlayer::Renderer::onFlush(const sp<AMessage> &msg) {
            mAudioSink->pause();
            mAudioSink->flush();
            mAudioSink->start();
        } else {
            mAudioSink->pause();
            mAudioSink->flush();
            // Call stop() to signal to the AudioSink to completely fill the
            // internal buffer before resuming playback.
            mAudioSink->stop();
            if (!mPaused) {
                mAudioSink->start();
            }
            mNumFramesWritten = 0;
        }
    } else {
        flushQueue(&mVideoQueue);