зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset f2af71dbdc75 (bug 1400674)
This commit is contained in:
Родитель
7ef2d3c369
Коммит
f0471958e1
|
@ -156,6 +156,8 @@ VorbisDataDecoder::ProcessDecode(MediaRawData* aSample)
|
||||||
const unsigned char* aData = aSample->Data();
|
const unsigned char* aData = aSample->Data();
|
||||||
size_t aLength = aSample->Size();
|
size_t aLength = aSample->Size();
|
||||||
int64_t aOffset = aSample->mOffset;
|
int64_t aOffset = aSample->mOffset;
|
||||||
|
auto aTstampUsecs = aSample->mTime;
|
||||||
|
int64_t aTotalFrames = 0;
|
||||||
|
|
||||||
MOZ_ASSERT(mPacketCount >= 3);
|
MOZ_ASSERT(mPacketCount >= 3);
|
||||||
|
|
||||||
|
@ -223,12 +225,12 @@ VorbisDataDecoder::ProcessDecode(MediaRawData* aSample)
|
||||||
__func__);
|
__func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto time = total_duration + aSample->mTime;
|
auto time = total_duration + aTstampUsecs;
|
||||||
if (!time.IsValid()) {
|
if (!time.IsValid()) {
|
||||||
return DecodePromise::CreateAndReject(
|
return DecodePromise::CreateAndReject(
|
||||||
MediaResult(
|
MediaResult(
|
||||||
NS_ERROR_DOM_MEDIA_OVERFLOW_ERR,
|
NS_ERROR_DOM_MEDIA_OVERFLOW_ERR,
|
||||||
RESULT_DETAIL("Overflow adding total_duration and aSample->mTime")),
|
RESULT_DETAIL("Overflow adding total_duration and aTstampUsecs")),
|
||||||
__func__);
|
__func__);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -248,6 +250,8 @@ VorbisDataDecoder::ProcessDecode(MediaRawData* aSample)
|
||||||
AudioSampleBuffer data(Move(buffer));
|
AudioSampleBuffer data(Move(buffer));
|
||||||
data = mAudioConverter->Process(Move(data));
|
data = mAudioConverter->Process(Move(data));
|
||||||
|
|
||||||
|
aTotalFrames += frames;
|
||||||
|
|
||||||
results.AppendElement(new AudioData(aOffset, time, duration,
|
results.AppendElement(new AudioData(aOffset, time, duration,
|
||||||
frames, data.Forget(), channels, rate));
|
frames, data.Forget(), channels, rate));
|
||||||
mFrames += frames;
|
mFrames += frames;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче