summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2014-09-05 11:42:58 -0700
committerAndy Hung <hunga@google.com>2014-09-05 11:42:58 -0700
commit7353585789513466d5887986620e8734a325b3eb (patch)
tree24935a3b0c25df12520f45e89ce95e2688ce0c23 /media/libmediaplayerservice
parentadf34bf9b7925f990259b1b6f4c69b8668f76ead (diff)
downloadframeworks_av-7353585789513466d5887986620e8734a325b3eb.zip
frameworks_av-7353585789513466d5887986620e8734a325b3eb.tar.gz
frameworks_av-7353585789513466d5887986620e8734a325b3eb.tar.bz2
NuPlayer: Restrict seek on video texture changes
MediaPlayer::setVideoSurfaceTexture() should generate seek to refresh display only if player is started and has video. Bug: 17379148 Bug: 17404923 Change-Id: I5f55dc40943e4419d08be6fdab964b8a2c5ee519
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index cf4757e..d2518a8 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -541,7 +541,13 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
static_cast<NativeWindowWrapper *>(obj.get())));
if (obj != NULL) {
- mDeferredActions.push_back(new SeekAction(mCurrentPositionUs));
+ if (mStarted && mVideoDecoder != NULL) {
+ // Issue a seek to refresh the video screen only if started otherwise
+ // the extractor may not yet be started and will assert.
+ // If the video decoder is not set (perhaps audio only in this case)
+ // do not perform a seek as it is not needed.
+ mDeferredActions.push_back(new SeekAction(mCurrentPositionUs));
+ }
// If there is a new surface texture, instantiate decoders
// again if possible.