summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2010-01-06 14:29:26 -0500
committerNat Goodspeed <nat@lindenlab.com>2010-01-06 14:29:26 -0500
commit657cbc3b74f0005290faf852e97d697296374566 (patch)
treec37c60962641816531e3d735a79df60b5b067e9b /indra/newview/llviewermedia.cpp
parent0f89155e295f632187704999d8ecc01f464a88d8 (diff)
parentaf61dd45b3afe8b62dceeb55a2ded7a9cfa34117 (diff)
Merge previously-unmerged product-engine commit
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r--indra/newview/llviewermedia.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index bf96472e7e..0fc0afed3e 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -987,7 +987,7 @@ void LLViewerMediaImpl::emitEvent(LLPluginClassMedia* plugin, LLViewerMediaObser
bool LLViewerMediaImpl::initializeMedia(const std::string& mime_type)
{
bool mimeTypeChanged = (mMimeType != mime_type);
- bool pluginChanged = (LLMIMETypes::implType(mMimeType) != LLMIMETypes::implType(mime_type));
+ bool pluginChanged = (LLMIMETypes::implType(mCurrentMimeType) != LLMIMETypes::implType(mime_type));
if(!mMediaSource || pluginChanged)
{
@@ -1127,6 +1127,9 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
// If we got here, we want to ignore previous init failures.
mMediaSourceFailed = false;
+ // Save the MIME type that really caused the plugin to load
+ mCurrentMimeType = mMimeType;
+
LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight);
if (media_source)
@@ -1563,6 +1566,7 @@ void LLViewerMediaImpl::unload()
mMediaURL.clear();
mMimeType.clear();
mCurrentMediaURL.clear();
+ mCurrentMimeType.clear();
}
//////////////////////////////////////////////////////////////////////////////////////////
@@ -2123,7 +2127,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
// TODO: may want a different message for this case?
LLSD args;
- args["PLUGIN"] = LLMIMETypes::implType(mMimeType);
+ args["PLUGIN"] = LLMIMETypes::implType(mCurrentMimeType);
LLNotificationsUtil::add("MediaPluginFailed", args);
}
break;
@@ -2137,7 +2141,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
resetPreviousMediaState();
LLSD args;
- args["PLUGIN"] = LLMIMETypes::implType(mMimeType);
+ args["PLUGIN"] = LLMIMETypes::implType(mCurrentMimeType);
// SJB: This is getting called every frame if the plugin fails to load, continuously respawining the alert!
//LLNotificationsUtil::add("MediaPluginFailed", args);
}