summaryrefslogtreecommitdiff
path: root/indra/llaudio/llaudiodecodemgr.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2014-03-26 10:08:19 -0700
committersimon <none@none>2014-03-26 10:08:19 -0700
commit70006f4a5651ebaa0362ec2f95b5dda13f72e5c7 (patch)
tree6e1f7e8ccea28fa830bca7f2508a626f6ca907c9 /indra/llaudio/llaudiodecodemgr.cpp
parent73ef75498692e7b7cecb4960f4e308061917d86e (diff)
parent33dfc0a8a1ed56d7d24611981736fd5baf6b03c2 (diff)
Pull in downstream -tiger, -bear, viewer-release and become version 3.7.5
Diffstat (limited to 'indra/llaudio/llaudiodecodemgr.cpp')
-rwxr-xr-xindra/llaudio/llaudiodecodemgr.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp
index 8c31f8b4de..ef63b2cc04 100755
--- a/indra/llaudio/llaudiodecodemgr.cpp
+++ b/indra/llaudio/llaudiodecodemgr.cpp
@@ -570,9 +570,14 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
// We had an error when decoding, abort.
LL_WARNS("AudioEngine") << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << LL_ENDL;
mCurrentDecodep->flushBadFile();
- LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
- adp->setHasValidData(false);
- adp->setHasCompletedDecode(true);
+
+ if (gAudiop)
+ {
+ LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
+ adp->setHasValidData(false);
+ adp->setHasCompletedDecode(true);
+ }
+
mCurrentDecodep = NULL;
done = TRUE;
}
@@ -584,7 +589,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
}
else if (mCurrentDecodep)
{
- if (mCurrentDecodep->finishDecode())
+ if (gAudiop && mCurrentDecodep->finishDecode())
{
// We finished!
LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
@@ -625,7 +630,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
{
LLUUID uuid;
mDecodeQueue.pop(uuid);
- if (gAudiop->hasDecodedFile(uuid))
+ if (!gAudiop || gAudiop->hasDecodedFile(uuid))
{
// This file has already been decoded, don't decode it again.
continue;
@@ -671,7 +676,7 @@ void LLAudioDecodeMgr::processQueue(const F32 num_secs)
BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
{
- if (gAudiop->hasDecodedFile(uuid))
+ if (gAudiop && gAudiop->hasDecodedFile(uuid))
{
// Already have a decoded version, don't need to decode it.
LL_DEBUGS("AudioEngine") << "addDecodeRequest for " << uuid << " has decoded file already" << LL_ENDL;