mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 18e7baac03ce (bug 1241062) for windows wpt bustage
This commit is contained in:
parent
dcfcc677d5
commit
776a3e3196
@ -148,12 +148,6 @@ OpusDataDecoder::DoDecode(MediaRawData* aSample)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!mLastFrameTime || mLastFrameTime.ref() != aSample->mTime) {
|
||||
// We are starting a new block.
|
||||
mFrames = 0;
|
||||
mLastFrameTime = Some(aSample->mTime);
|
||||
}
|
||||
|
||||
// Maximum value is 63*2880, so there's no chance of overflow.
|
||||
int32_t frames_number = opus_packet_get_nb_frames(aSample->Data(),
|
||||
aSample->Size());
|
||||
@ -259,9 +253,8 @@ OpusDataDecoder::DoDecode(MediaRawData* aSample)
|
||||
NS_WARNING("OpusDataDecoder: Int overflow converting WebM audio duration");
|
||||
return -1;
|
||||
}
|
||||
CheckedInt64 time =
|
||||
startTime - FramesToUsecs(mOpusParser->mPreSkip, mOpusParser->mRate) +
|
||||
FramesToUsecs(mFrames, mOpusParser->mRate);
|
||||
CheckedInt64 time = startTime - FramesToUsecs(mOpusParser->mPreSkip,
|
||||
mOpusParser->mRate);
|
||||
if (!time.isValid()) {
|
||||
NS_WARNING("OpusDataDecoder: Int overflow shifting tstamp by codec delay");
|
||||
return -1;
|
||||
@ -302,7 +295,7 @@ OpusDataDecoder::Flush()
|
||||
opus_multistream_decoder_ctl(mOpusDecoder, OPUS_RESET_STATE);
|
||||
mSkip = mOpusParser->mPreSkip;
|
||||
mPaddingDiscarded = false;
|
||||
mLastFrameTime.reset();
|
||||
mFrames = 0;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "OpusParser.h"
|
||||
#include "PlatformDecoderModule.h"
|
||||
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
namespace mozilla {
|
||||
@ -54,7 +53,6 @@ private:
|
||||
// will raise an error so we can indicate that the file is invalid.
|
||||
bool mPaddingDiscarded;
|
||||
int64_t mFrames;
|
||||
Maybe<int64_t> mLastFrameTime;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
Loading…
Reference in New Issue
Block a user