OSDN Git Service

Flush resets the count of played audio frames
authorJames Dong <jdong@google.com>
Wed, 28 Sep 2011 05:47:25 +0000 (22:47 -0700)
committerJames Dong <jdong@google.com>
Wed, 28 Sep 2011 05:47:25 +0000 (22:47 -0700)
Change-Id: I0cda94646a71757fa113a199d29235e13efd7ac3
related-to-bug: 5331470

media/libstagefright/AudioPlayer.cpp

index ba076f5..2581a62 100644 (file)
@@ -508,6 +508,9 @@ status_t AudioPlayer::seekTo(int64_t time_us) {
     mReachedEOS = false;
     mSeekTimeUs = time_us;
 
+    // Flush resets the number of played frames
+    mNumFramesPlayed = 0;
+
     if (mAudioSink != NULL) {
         mAudioSink->flush();
     } else {