Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c0487de authored by Jeff Tinker's avatar Jeff Tinker Committed by Android Git Automerger
Browse files

am bd710197: Merge "[WVDRM] Fix for stuttering on low bandwidth" into jb-mr1-dev

* commit 'bd710197':
  [WVDRM] Fix for stuttering on low bandwidth
parents 008d15d3 bd710197
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -755,22 +755,18 @@ void AwesomePlayer::onBufferingUpdate() {
        if ((mFlags & PLAYING) && !eos
                && (cachedDurationUs < kLowWaterMarkUs)) {
            modifyFlags(CACHE_UNDERRUN, SET);
            if (mWVMExtractor == NULL) {
            ALOGI("cache is running low (%.2f secs) , pausing.",
                  cachedDurationUs / 1E6);
            pause_l();
            ensureCacheIsFetching_l();
            }
            sendCacheStats();
            notifyListener_l(MEDIA_INFO, MEDIA_INFO_BUFFERING_START);
        } else if (eos || cachedDurationUs > kHighWaterMarkUs) {
            if (mFlags & CACHE_UNDERRUN) {
                modifyFlags(CACHE_UNDERRUN, CLEAR);
                if (mWVMExtractor == NULL) {
                ALOGI("cache has filled up (%.2f secs), resuming.",
                      cachedDurationUs / 1E6);
                play_l();
                }
            } else if (mFlags & PREPARING) {
                ALOGV("cache has filled up (%.2f secs), prepare is done",
                     cachedDurationUs / 1E6);