diff options
author | Andy Hung <hunga@google.com> | 2014-09-03 18:22:22 -0700 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2014-09-04 19:06:56 -0700 |
commit | adf34bf9b7925f990259b1b6f4c69b8668f76ead (patch) | |
tree | fc74585a5399a572e44bc8f25717c7d277e6d6be /media/libmediaplayerservice/nuplayer/NuPlayer.cpp | |
parent | 6a548e9114c4a283a6e08a2d35540f8549f44b82 (diff) | |
download | frameworks_av-adf34bf9b7925f990259b1b6f4c69b8668f76ead.zip frameworks_av-adf34bf9b7925f990259b1b6f4c69b8668f76ead.tar.gz frameworks_av-adf34bf9b7925f990259b1b6f4c69b8668f76ead.tar.bz2 |
NuPlayer: Discard seeks when source and decoders are NULL
Problem occurs when loop mode asynchronously seeks to the
start of the source after a MediaPlayer::reset().
Bug: 17379148
Change-Id: I50bfe65a753afffb1d478db54c76067a9c61a0ae
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayer.cpp')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index ae22123..cf4757e 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -1665,6 +1665,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; |