зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 18e7baac03ce (bug 1241062) for windows wpt bustage
--HG-- extra : commitid : 4TllxSzuUyX
This commit is contained in:
Родитель
56d625df80
Коммит
ee004dddf0
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче