summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r--indra/newview/llviewermedia.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 2b972614f1..60b3af5ca1 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)
{
@@ -1374,6 +1381,18 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
{
switch(event)
{
+ case MEDIA_EVENT_PLUGIN_FAILED_LAUNCH:
+ {
+ // The plugin failed to load properly. Make sure the timer doesn't retry.
+ mMediaSourceFailedInit = true;
+
+ // TODO: may want a different message for this case?
+ LLSD args;
+ args["PLUGIN"] = LLMIMETypes::implType(mMimeType);
+ LLNotifications::instance().add("MediaPluginFailed", args);
+ }
+ break;
+
case MEDIA_EVENT_PLUGIN_FAILED:
{
LLSD args;