Fix pause at end of movie.
The function WVMExtractorImpl::getCachedDurationUs returns the cached buffer size in microseconds, and sets a status to ERROR_END_OF_STREAM at the end of the movie. The AwesomePlayer will pause if the cache is too small and the status is not EOS. In bug 6277231, the player would pause just before the EOS marker would have been seen by the Widevine library. This change checks the current play time against the total movie duration. If there is less than 10 seconds left in the movie, the EOS flag is set. related-to-bug: 6277231 Change-Id: I8dbf60c82c41df485185f85e72452aab0a6a9686
This commit is contained in:
@@ -44,6 +44,8 @@ public:
|
||||
|
||||
static int sLastError;
|
||||
|
||||
int64_t getTime() { return mKeyTime; }; // usec.
|
||||
|
||||
#ifdef REQUIRE_SECURE_BUFFERS
|
||||
class DecryptContext {
|
||||
public:
|
||||
@@ -84,6 +86,7 @@ private:
|
||||
|
||||
MediaBufferGroup *mGroup;
|
||||
|
||||
int64_t mKeyTime;
|
||||
unsigned long long mDts;
|
||||
unsigned long long mPts;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user