diff options
author | Wei Jia <wjia@google.com> | 2015-05-02 00:26:06 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-02 00:26:07 +0000 |
commit | 0247f0db93a828f0754a6d2d278cb08c6609cf26 (patch) | |
tree | 83c7a816892699eb183627255054c70d9b3eef6b | |
parent | 939270353bff5bc7497b0c77e203520b997268c9 (diff) | |
parent | 9e7ed3315298b42db485963b182a572e9ab42f9f (diff) | |
download | frameworks_av-0247f0db93a828f0754a6d2d278cb08c6609cf26.zip frameworks_av-0247f0db93a828f0754a6d2d278cb08c6609cf26.tar.gz frameworks_av-0247f0db93a828f0754a6d2d278cb08c6609cf26.tar.bz2 |
Merge "mediaplayer: flush audio sink when renderer is flushed." into mnc-dev
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp index ae01cfc..6b8f99c 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp @@ -1240,6 +1240,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); |