summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/httplive/LiveSession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/httplive/LiveSession.cpp')
-rw-r--r--media/libstagefright/httplive/LiveSession.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp
index 5c4c5df..5b1f14d 100644
--- a/media/libstagefright/httplive/LiveSession.cpp
+++ b/media/libstagefright/httplive/LiveSession.cpp
@@ -157,9 +157,16 @@ void LiveSession::onConnect(const sp<AMessage> &msg) {
mBandwidthItems.sort(SortByBandwidth);
- if (mBandwidthItems.size() > 1) {
- // XXX Remove the lowest bitrate stream for now...
- mBandwidthItems.removeAt(0);
+ char value[PROPERTY_VALUE_MAX];
+ if (!property_get("media.httplive.enable-nuplayer", value, NULL)
+ || (strcasecmp(value, "true") && strcmp(value, "1"))) {
+ // The "legacy" player cannot deal with audio format changes,
+ // some streams use different audio encoding parameters for
+ // their lowest bandwidth stream.
+ if (mBandwidthItems.size() > 1) {
+ // XXX Remove the lowest bitrate stream for now...
+ mBandwidthItems.removeAt(0);
+ }
}
}
@@ -421,7 +428,7 @@ void LiveSession::onDownloadNext() {
++mNumRetries;
mLastPlaylistFetchTimeUs = -1;
- postMonitorQueue(1000000ll);
+ postMonitorQueue(3000000ll);
return;
}