summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice
diff options
context:
space:
mode:
authorManikanta Kanamarlapudi <kmanikan@codeaurora.org>2016-02-23 17:25:40 +0530
committerSteve Kondik <steve@cyngn.com>2016-04-13 13:54:55 -0700
commit48827966831de92e0190f96820fa6e7d9e149b50 (patch)
tree2869699797e3f68a02f42e2508e2fc05970116e8 /media/libmediaplayerservice
parent51b3174ac272f146f7a4fb502103d8130b6f4703 (diff)
downloadframeworks_av-48827966831de92e0190f96820fa6e7d9e149b50.zip
frameworks_av-48827966831de92e0190f96820fa6e7d9e149b50.tar.gz
frameworks_av-48827966831de92e0190f96820fa6e7d9e149b50.tar.bz2
nuplayer: Seek to valid position in setVideoSurface
- If flush is called on both A/V tracks and video decoder is not yet created, In offload case the first audio buffer will get flush and audio playback starts from timestamp of second buffer, where as video playback starts from zero leads to AV sync issue in start and cause framedrops. - Call seek to current position to align the Audio and Video tracks. Seek to zero if playback has not yet started. Change-Id: I4f75d0aa908714ad292f348fa8bf7aa5f837f8d7
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index 2ffd184..ef2e6ec 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -681,10 +681,9 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
// If the video decoder is not set (perhaps audio only in this case)
// do not perform a seek as it is not needed.
int64_t currentPositionUs = 0;
- if (getCurrentPosition(&currentPositionUs) == OK) {
- mDeferredActions.push_back(
- new SeekAction(currentPositionUs));
- }
+ getCurrentPosition(&currentPositionUs);
+ mDeferredActions.push_back(
+ new SeekAction(currentPositionUs));
}
// If there is a new surface texture, instantiate decoders