am aa1a694d: Merge "Make sure to finish the preparation phase even EOS occurs before we consider the cache to be completely filled up." into gingerbread

Merge commit 'aa1a694dc78e5201fc83fe3d710a6e43eb62831a' into gingerbread-plus-aosp

* commit 'aa1a694dc78e5201fc83fe3d710a6e43eb62831a':
  Make sure to finish the preparation phase even EOS occurs before we consider the cache to be completely filled up.
This commit is contained in:
Andreas Huber
2010-10-04 11:47:52 -07:00
committed by Android Git Automerger

View File

@@ -484,6 +484,10 @@ void AwesomePlayer::onBufferingUpdate() {
if (eos) {
notifyListener_l(MEDIA_BUFFERING_UPDATE, 100);
if (mFlags & PREPARING) {
LOGV("cache has reached EOS, prepare is done.");
finishAsyncPrepare_l();
}
} else {
off_t size;
if (mDurationUs >= 0 && mCachedSource->getSize(&size) == OK) {