diff options
-rw-r--r-- | media/libstagefright/httplive/LiveSession.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index 190188a..d3f25a1 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -1627,6 +1627,12 @@ void LiveSession::onCheckSwitchDown() { return; } + if (mSwitchInProgress || mReconfigurationInProgress) { + ALOGV("Switch/Reconfig in progress, defer switch down"); + mSwitchDownMonitor->post(1000000ll); + return; + } + for (size_t i = 0; i < kMaxStreams; ++i) { int32_t targetDuration; sp<AnotherPacketSource> packetSource = mPacketSources.valueFor(indexToType(i)); @@ -1657,7 +1663,6 @@ void LiveSession::onSwitchDown() { return; } - changeConfiguration(-1, mCurBandwidthIndex - 1, false); } // Mark switch done when: |