summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMark Palange (Mani) <palange@lindenlab.com>2009-10-05 14:53:31 -0700
committerMark Palange (Mani) <palange@lindenlab.com>2009-10-05 14:53:31 -0700
commit6ef3f20933c5df684298bc1b8f338ce9dfd49070 (patch)
tree5fadf8408d46987227aae5fb067b157610f95ec8 /indra/newview
parent81a63ac0886a31a566535a3483e5013f5bc0b424 (diff)
parent0c475833994d1b89bbd5a09872eea73c32c8c5c3 (diff)
merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewermedia.cpp11
-rw-r--r--indra/newview/llviewermedia.h1
2 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 100a34291b..d5c75b82a7 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -589,6 +589,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id,
mPriority(LLPluginClassMedia::PRIORITY_UNLOADED),
mDoNavigateOnLoad(false),
mDoNavigateOnLoadServerRequest(false),
+ mMediaSourceFailedInit(false),
mIsUpdated(false)
{
@@ -703,7 +704,7 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type)
LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height)
{
std::string plugin_basename = LLMIMETypes::implType(media_type);
-
+
if(plugin_basename.empty())
{
LL_WARNS("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL;
@@ -774,6 +775,9 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
return false;
}
+ // If we got here, we want to ignore previous init failures.
+ mMediaSourceFailedInit = false;
+
LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight);
if (media_source)
@@ -787,6 +791,9 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
return true;
}
+ // Make sure the timer doesn't try re-initing this plugin repeatedly until something else changes.
+ mMediaSourceFailedInit = true;
+
return false;
}
@@ -1147,7 +1154,7 @@ bool LLViewerMediaImpl::canNavigateBack()
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::update()
{
- if(mMediaSource == NULL)
+ if(mMediaSource == NULL && !mMediaSourceFailedInit)
{
if(mPriority != LLPluginClassMedia::PRIORITY_UNLOADED)
{
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index c9ba5841e9..d534ef97b9 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -279,6 +279,7 @@ public:
LLPluginClassMedia::EPriority mPriority;
bool mDoNavigateOnLoad;
bool mDoNavigateOnLoadServerRequest;
+ bool mMediaSourceFailedInit;
private: