diff options
author | Andy Hung <hunga@google.com> | 2014-09-05 20:38:27 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-05 20:38:28 +0000 |
commit | 767fc12e58422eef14aa40a5e7ffefd0b3949b82 (patch) | |
tree | 6e9ee8947d5f95336517cc834f01da507ee824bc | |
parent | 3ec9c3d2d813149b9f049afc5ea48f1276645f3a (diff) | |
parent | adf34bf9b7925f990259b1b6f4c69b8668f76ead (diff) | |
download | frameworks_av-767fc12e58422eef14aa40a5e7ffefd0b3949b82.zip frameworks_av-767fc12e58422eef14aa40a5e7ffefd0b3949b82.tar.gz frameworks_av-767fc12e58422eef14aa40a5e7ffefd0b3949b82.tar.bz2 |
Merge "NuPlayer: Discard seeks when source and decoders are NULL" into lmp-dev
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.cpp | 8 | ||||
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index bfe2710..1020cb3 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -1669,6 +1669,14 @@ void NuPlayer::performSeek(int64_t seekTimeUs) { seekTimeUs, seekTimeUs / 1E6); + if (mSource == NULL) { + // This happens when reset occurs right before the loop mode + // asynchronously seeks to the start of the stream. + LOG_ALWAYS_FATAL_IF(mAudioDecoder != NULL || mVideoDecoder != NULL, + "mSource is NULL and decoders not NULL audio(%p) video(%p)", + mAudioDecoder.get(), mVideoDecoder.get()); + return; + } mSource->seekTo(seekTimeUs); ++mTimedTextGeneration; diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp index 2423f5f..09324ae 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp @@ -626,7 +626,7 @@ void NuPlayerDriver::notifyListener_l( switch (msg) { case MEDIA_PLAYBACK_COMPLETE: { - if (mLooping) { + if (mLooping && mState != STATE_RESET_IN_PROGRESS) { mLock.unlock(); mPlayer->seekToAsync(0); mLock.lock(); |