summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Huber <andih@google.com> 2011-08-26 11:26:25 -0700
committer Andreas Huber <andih@google.com> 2011-08-26 11:26:25 -0700
commit9ba16f6c5485d5384ed38df63c7d23e3d20e8d31 (patch)
tree9a950eb4e02ecda9840ce3b10c672c17bc7437a9
parentfdfbbf62e61020b6b6170862eaabd72b43bca4ea (diff)
Properly reset the number of frames we think we've written to the audio sink
in order to compute the final delay before posting end-of-stream correctly. Change-Id: I4ff6d7142fdf1ea2d19d12ec78c1e84322d22e5f related-to-bug: 5216930
-rw-r--r--media/libstagefright/AudioPlayer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp
index dd69e6ba54d3..d41ab1b55acd 100644
--- a/media/libstagefright/AudioPlayer.cpp
+++ b/media/libstagefright/AudioPlayer.cpp
@@ -180,6 +180,8 @@ void AudioPlayer::pause(bool playPendingSamples) {
} else {
mAudioTrack->stop();
}
+
+ mNumFramesPlayed = 0;
} else {
if (mAudioSink.get() != NULL) {
mAudioSink->pause();