diff options
author | Andy Hung <hunga@google.com> | 2014-09-05 21:49:32 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-05 21:49:33 +0000 |
commit | ade312d5c933cff798c3febefabc47b00390ee4a (patch) | |
tree | 695e1891f037f8833dacc0ef966f832e7b5adad8 /media | |
parent | 767fc12e58422eef14aa40a5e7ffefd0b3949b82 (diff) | |
parent | 7353585789513466d5887986620e8734a325b3eb (diff) | |
download | frameworks_av-ade312d5c933cff798c3febefabc47b00390ee4a.zip frameworks_av-ade312d5c933cff798c3febefabc47b00390ee4a.tar.gz frameworks_av-ade312d5c933cff798c3febefabc47b00390ee4a.tar.bz2 |
Merge "NuPlayer: Restrict seek on video texture changes" into lmp-dev
Diffstat (limited to 'media')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index 1020cb3..4a5d18a 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. |