From 03fdfde372fa561739c03b2a7916b5090f07c8c4 Mon Sep 17 00:00:00 2001 From: Yunji Kim Date: Sun, 2 Jun 2013 17:39:30 +0100 Subject: libstagefright: Fix a video lag bug after audio reached EOS. http://git.insignal.co.kr/samsung/exynos/android/platform/frameworks/av/commit/?h=exynos-jb&id=da4104e5f934633b4ba7fda06bc9ef3ba0f85a31 Change-Id: I14931cad92df48e1233c5a8a704bb18585b1795a --- media/libstagefright/AwesomePlayer.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index ad221d1..1b1ba37 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -2218,6 +2218,18 @@ void AwesomePlayer::postCheckAudioStatusEvent(int64_t delayUs) { return; } mAudioStatusEventPending = true; + +#ifdef EXYNOS4_ENHANCEMENTS + /* + * Do not honor delay when audio reached EOS + * in order to change immediately time source from AudioPlayer to SystemTime + */ + status_t finalStatus; + if (mWatchForAudioEOS && mAudioPlayer->reachedEOS(&finalStatus)) { + delayUs = 0; + } +#endif + // Do not honor delay when looping in order to limit audio gap if (mFlags & (LOOPING | AUTO_LOOPING)) { delayUs = 0; -- cgit v1.1