Merge "Revert "Merge "Improve AudioPlayer position reporting""" into jb-dev
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp
index 8fb0d8d..ca49782 100644
--- a/media/libstagefright/AudioPlayer.cpp
+++ b/media/libstagefright/AudioPlayer.cpp
@@ -450,11 +450,8 @@
                         kKeyTime, &mPositionTimeMediaUs));
 
             mPositionTimeRealUs =
-                -mLatencyUs + ((mNumFramesPlayed + size_done / mFrameSize) * 1000000)
+                ((mNumFramesPlayed + size_done / mFrameSize) * 1000000)
                     / mSampleRate;
-            if (mPositionTimeRealUs < 0) {
-                mPositionTimeRealUs = 0;
-            }
 
             ALOGV("buffer->size() = %d, "
                  "mPositionTimeMediaUs=%.2f mPositionTimeRealUs=%.2f",
@@ -509,9 +506,7 @@
 int64_t AudioPlayer::getRealTimeUsLocked() const {
     CHECK(mStarted);
     CHECK_NE(mSampleRate, 0);
-    int64_t t = -mLatencyUs + (mNumFramesPlayed * 1000000) / mSampleRate;
-    if (t < 0) return 0;
-    return t;
+    return -mLatencyUs + (mNumFramesPlayed * 1000000) / mSampleRate;
 }
 
 int64_t AudioPlayer::getMediaTimeUs() {