diff options
-rw-r--r-- | media/libstagefright/AudioPlayer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp index 04fc88b..e24824b 100644 --- a/media/libstagefright/AudioPlayer.cpp +++ b/media/libstagefright/AudioPlayer.cpp @@ -766,6 +766,11 @@ int64_t AudioPlayer::getMediaTimeUs() { if (mSeeking) { return mSeekTimeUs; } + if (mReachedEOS) { + int64_t durationUs; + mSource->getFormat()->findInt64(kKeyDuration, &durationUs); + return durationUs; + } mPositionTimeRealUs = getOutputPlayPositionUs_l(); ALOGV("getMediaTimeUs getOutputPlayPositionUs_l() mPositionTimeRealUs %" PRId64, mPositionTimeRealUs); |