From aba67da38b8b983f043b536b9743f80abfb6e33a Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Mon, 5 Oct 2009 18:14:27 -0700 Subject: FIX DEV-40877: ignore changes from "bad" objects which have an invalid media URL --- indra/newview/app_settings/logcontrol.xml | 4 ++++ indra/newview/llmediadataclient.cpp | 2 +- indra/newview/llvovolume.cpp | 24 +++++++++++++++++------- 3 files changed, 22 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index d7bb64ce8a..85cb3cf1b4 100644 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -25,6 +25,7 @@ AppCache Window RenderInit + MediaOnAPrim @@ -34,12 +35,15 @@ classes + LLMediaDataClient files tags + LLMediaDataClient + MediaOnAPrim diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 54521ccb84..c356f55315 100644 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -618,6 +618,6 @@ void LLObjectMediaNavigateClient::Responder::bounceBack() if (mep && impl) { -// impl->navigateTo(mep->getCurrentURL()); + impl->navigateTo(mep->getCurrentURL(), "", false, true); } } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 583246c23e..428de078de 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -319,13 +319,23 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, } } } - if (retval & (MEDIA_URL_REMOVED | MEDIA_URL_ADDED | MEDIA_URL_UPDATED | MEDIA_FLAGS_CHANGED)) { - // If the media changed at all, request new media data - if(mMedia) - { - llinfos << "Media URL: " << mMedia->mMediaURL << llendl; - } - requestMediaDataUpdate(); + if (retval & (MEDIA_URL_REMOVED | MEDIA_URL_ADDED | MEDIA_URL_UPDATED | MEDIA_FLAGS_CHANGED)) + { + // If only the media URL changed, and it isn't a media version URL, + // ignore it + if ( ! ( retval & (MEDIA_URL_ADDED | MEDIA_URL_UPDATED) && + mMedia && ! mMedia->mMediaURL.empty() && + ! LLTextureEntry::isMediaVersionString(mMedia->mMediaURL) ) ) + { + // If the media changed at all, request new media data + LL_DEBUGS("MediaOnAPrim") << "Media update: " << getID() << ": retval=" << retval << " Media URL: " << + ((mMedia) ? mMedia->mMediaURL : std::string("")) << LL_ENDL; + requestMediaDataUpdate(); + } + else { + LL_INFOS("MediaOnAPrim") << "Ignoring media update for: " << getID() << " Media URL: " << + ((mMedia) ? mMedia->mMediaURL : std::string("")) << LL_ENDL; + } } // ...and clean up any media impls cleanUpMediaImpls(); -- cgit v1.2.3