MAINT-6042 FIXED Audio/Media automatically starts playing again after clicking "Stop All"

master
andreykproductengine 2016-01-14 17:26:17 +02:00
parent 2ae77b2901
commit f26f1ca0f4
1 changed files with 5 additions and 2 deletions

View File

@ -1453,6 +1453,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
BOOL region_deny_identified_override = false; // Deprecated
BOOL region_deny_transacted_override = false; // Deprecated
BOOL region_deny_age_unverified_override = false;
BOOL changed_parcel = false;
S32 other_clean_time = 0;
@ -1571,6 +1572,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (parcel == parcel_mgr.mAgentParcel)
{
// new agent parcel
changed_parcel = true;
S32 bitmap_size = parcel_mgr.mParcelsPerEdge
* parcel_mgr.mParcelsPerEdge
/ 8;
@ -1759,7 +1761,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
LLStringUtil::trim(music_url);
// If there is a new music URL and it's valid, play it.
if (music_url.size() > 12)
const std::string& stream_url = gAudiop->getInternetStreamURL();
if (music_url.size() > 12 && (music_url != stream_url || changed_parcel))
{
if (music_url.substr(0,7) == "http://")
{
@ -1773,7 +1776,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
}
}
else if (!gAudiop->getInternetStreamURL().empty())
else if (!stream_url.empty())
{
LL_INFOS() << "Stopping parcel music (parcel stream URL is empty)" << LL_ENDL;
// null value causes fade out