summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/httplive/PlaylistFetcher.cpp
diff options
context:
space:
mode:
authorApurupa Pattapu <apurupa@codeaurora.org>2015-01-29 07:40:01 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-01-29 07:40:01 +0000
commit59d1d0100e56bc6749c2eccf3b4b06904084944c (patch)
treed0c36872da5d2cfff2a8e198ce2dbc99ec85acbe /media/libstagefright/httplive/PlaylistFetcher.cpp
parent3606efd19a7dee847d3d4db41e8300ba7b451f81 (diff)
parent79971c747e62cad50359286f18dee0c4de5829da (diff)
downloadframeworks_av-59d1d0100e56bc6749c2eccf3b4b06904084944c.zip
frameworks_av-59d1d0100e56bc6749c2eccf3b4b06904084944c.tar.gz
frameworks_av-59d1d0100e56bc6749c2eccf3b4b06904084944c.tar.bz2
am 79971c74: httplive: Dont resume if we have almost fetched till stop time
* commit '79971c747e62cad50359286f18dee0c4de5829da': httplive: Dont resume if we have almost fetched till stop time
Diffstat (limited to 'media/libstagefright/httplive/PlaylistFetcher.cpp')
-rw-r--r--media/libstagefright/httplive/PlaylistFetcher.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/media/libstagefright/httplive/PlaylistFetcher.cpp b/media/libstagefright/httplive/PlaylistFetcher.cpp
index 440465c..07c86e5 100644
--- a/media/libstagefright/httplive/PlaylistFetcher.cpp
+++ b/media/libstagefright/httplive/PlaylistFetcher.cpp
@@ -50,7 +50,7 @@ namespace android {
const int64_t PlaylistFetcher::kMinBufferedDurationUs = 10000000ll;
const int64_t PlaylistFetcher::kMaxMonitorDelayUs = 3000000ll;
const int32_t PlaylistFetcher::kDownloadBlockSize = 2048;
-const int32_t PlaylistFetcher::kNumSkipFrames = 10;
+const int32_t PlaylistFetcher::kNumSkipFrames = 5;
PlaylistFetcher::PlaylistFetcher(
const sp<AMessage> &notify,
@@ -561,7 +561,7 @@ status_t PlaylistFetcher::onResumeUntil(const sp<AMessage> &msg) {
// Don't resume if we would stop within a resume threshold.
int32_t discontinuitySeq;
int64_t latestTimeUs = 0, stopTimeUs = 0;
- sp<AMessage> latestMeta = packetSource->getLatestDequeuedMeta();
+ sp<AMessage> latestMeta = packetSource->getLatestEnqueuedMeta();
if (latestMeta != NULL
&& latestMeta->findInt32("discontinuitySeq", &discontinuitySeq)
&& discontinuitySeq == mDiscontinuitySeq
@@ -1678,7 +1678,7 @@ void PlaylistFetcher::updateDuration() {
int64_t PlaylistFetcher::resumeThreshold(const sp<AMessage> &msg) {
int64_t durationUs, threshold;
- if (msg->findInt64("durationUs", &durationUs)) {
+ if (msg->findInt64("durationUs", &durationUs) && durationUs > 0) {
return kNumSkipFrames * durationUs;
}