OSDN Git Service

Don't update prepare state more than once
authorGlenn Kasten <gkasten@google.com>
Tue, 4 Oct 2011 00:19:50 +0000 (17:19 -0700)
committerGlenn Kasten <gkasten@google.com>
Tue, 4 Oct 2011 00:19:50 +0000 (17:19 -0700)
commit5a7123b8f2a7c726ff5d5ef89952b213a4da8411
treeceda110678f2cc7a86cd11bf90099538abf3559f
parent55e684e7e175739605112574d14de1e77f5172d5
Don't update prepare state more than once

If a MEDIA_ERROR event is received during preparation, it indicates
that prepare has completed unsuccessfully.  However, MEDIA_ERROR can
also legitimately be sent after successful prepare. In that case, don't
update the prepare state.

Similarly, in the unlikely case that MEDIA_PREPARED is received after
prepare has already completed successfully or unsuccessfully, ignore it.
This probably indicates a buggy mediaserver, but we wouldn't want that
to take down the client also.

Change-Id: I2a92e98d13b70d1aa5ff6f440ad528f6896a2ead
wilhelm/src/android/android_GenericMediaPlayer.cpp