commit | bd8fbfa956cff6b7c54af987cabdef2090c7219d | [log] [tgz] |
---|---|---|
author | Andreas Huber <andih@google.com> | Fri Jul 15 16:25:41 2011 -0700 |
committer | Andreas Huber <andih@google.com> | Fri Jul 15 16:26:47 2011 -0700 |
tree | 23fe6ed4bae0948c008defb8ae998971eb869549 | |
parent | e1ea88c5735f30122d896ae961ccb360e8952fea [diff] |
Fix seek behaviour at startup and teardown of media session that hasn't been started Nuplayer specific. Change-Id: I7b0be52c29bdb7032414d63c503d686df7844bf6
diff --git a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp index 5a5330d..0251baf 100644 --- a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp +++ b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
@@ -58,8 +58,10 @@ } NuPlayer::HTTPLiveSource::~HTTPLiveSource() { - mLiveSession->disconnect(); - mLiveLooper->stop(); + if (mLiveSession != NULL) { + mLiveSession->disconnect(); + mLiveLooper->stop(); + } } void NuPlayer::HTTPLiveSource::start() {
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp index 7cd8b6c..c6fca2c 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
@@ -118,9 +118,15 @@ mPlayer->start(); if (mStartupSeekTimeUs >= 0) { - mPlayer->seekToAsync(mStartupSeekTimeUs); + if (mStartupSeekTimeUs == 0) { + notifySeekComplete(); + } else { + mPlayer->seekToAsync(mStartupSeekTimeUs); + } + mStartupSeekTimeUs = -1; } + break; } case PLAYING: