Bug 929430 part 1: Wrap OggReader.cpp's opus-specific function calls in #ifdef MOZ_OPUS, so that it can build successfully with --disable-opus. r=rillian

This commit is contained in:
Daniel Holbert 2013-10-23 08:21:02 +02:00
parent 9fbb234a7f
commit a85560fe74

View File

@ -131,9 +131,11 @@ nsresult OggReader::ResetDecode(bool start)
if (mVorbisState && NS_FAILED(mVorbisState->Reset())) {
res = NS_ERROR_FAILURE;
}
#ifdef MOZ_OPUS
if (mOpusState && NS_FAILED(mOpusState->Reset(start))) {
res = NS_ERROR_FAILURE;
}
#endif /* MOZ_OPUS */
if (mTheoraState && NS_FAILED(mTheoraState->Reset())) {
res = NS_ERROR_FAILURE;
}
@ -1822,10 +1824,12 @@ nsresult OggReader::GetBuffered(TimeRanges* aBuffered, int64_t aStartTime)
startTime = VorbisState::Time(&mVorbisInfo, granulepos);
NS_ASSERTION(startTime > 0, "Must have positive start time");
}
#ifdef MOZ_OPUS
else if (mOpusState && serial == mOpusSerial) {
startTime = OpusState::Time(mOpusPreSkip, granulepos);
NS_ASSERTION(startTime > 0, "Must have positive start time");
}
#endif /* MOZ_OPUS */
else if (mTheoraState && serial == mTheoraSerial) {
startTime = TheoraState::Time(&mTheoraInfo, granulepos);
NS_ASSERTION(startTime > 0, "Must have positive start time");