diff options
Diffstat (limited to 'indra/llaudio/llaudiodecodemgr.cpp')
-rw-r--r-- | indra/llaudio/llaudiodecodemgr.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index fc2190707a..290206ee22 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -230,29 +230,19 @@ BOOL LLVorbisDecodeState::initDecode() bool abort_decode = false; - if (vi) - { - if( vi->channels < 1 || vi->channels > LLVORBIS_CLIP_MAX_CHANNELS ) - { - abort_decode = true; - llwarns << "Bad channel count: " << vi->channels << llendl; - } - } - else // !vi + if( vi->channels < 1 || vi->channels > LLVORBIS_CLIP_MAX_CHANNELS ) { abort_decode = true; - llwarns << "No default bitstream found" << llendl; + llwarns << "Bad channel count: " << vi->channels << llendl; } - if( (size_t)sample_count > LLVORBIS_CLIP_REJECT_SAMPLES || - (size_t)sample_count <= 0) + if( (size_t)sample_count > LLVORBIS_CLIP_REJECT_SAMPLES ) { abort_decode = true; llwarns << "Illegal sample count: " << sample_count << llendl; } - if( size_guess > LLVORBIS_CLIP_REJECT_SIZE || - size_guess < 0) + if( size_guess > LLVORBIS_CLIP_REJECT_SIZE ) { abort_decode = true; llwarns << "Illegal sample size: " << size_guess << llendl; @@ -261,11 +251,7 @@ BOOL LLVorbisDecodeState::initDecode() if( abort_decode ) { llwarns << "Canceling initDecode. Bad asset: " << mUUID << llendl; - vorbis_comment* comment = ov_comment(&mVF,-1); - if (comment && comment->vendor) - { - llwarns << "Bad asset encoded by: " << comment->vendor << llendl; - } + llwarns << "Bad asset encoded by: " << ov_comment(&mVF,-1)->vendor << llendl; delete mInFilep; mInFilep = NULL; return FALSE; |