зеркало из https://github.com/mozilla/gecko-dev.git
Revert "Bug 1240201: [opus] P2. Properly determine sample duration and time in webm demuxer. r=kinetik"
This reverts commit d8eb98e2
This commit is contained in:
Родитель
66c6ef708f
Коммит
30a05ebd7f
|
@ -29,8 +29,6 @@
|
||||||
#include "vpx/vp8dx.h"
|
#include "vpx/vp8dx.h"
|
||||||
#include "vpx/vpx_decoder.h"
|
#include "vpx/vpx_decoder.h"
|
||||||
|
|
||||||
#include <opus/opus.h>
|
|
||||||
|
|
||||||
#define WEBM_DEBUG(arg, ...) MOZ_LOG(gWebMDemuxerLog, mozilla::LogLevel::Debug, ("WebMDemuxer(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
#define WEBM_DEBUG(arg, ...) MOZ_LOG(gWebMDemuxerLog, mozilla::LogLevel::Debug, ("WebMDemuxer(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
@ -580,17 +578,6 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType, MediaRawDataQueue *aSampl
|
||||||
FramesToTimeUnit(nsamples, mInfo.mAudio.mRate).ToMicroseconds();
|
FramesToTimeUnit(nsamples, mInfo.mAudio.mRate).ToMicroseconds();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case NESTEGG_CODEC_OPUS:
|
|
||||||
{
|
|
||||||
int nsamples =
|
|
||||||
opus_packet_get_nb_samples(data, length, mInfo.mAudio.mRate);
|
|
||||||
if (nsamples < 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
duration =
|
|
||||||
FramesToTimeUnit(nsamples, mInfo.mAudio.mRate).ToMicroseconds();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -625,8 +612,7 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType, MediaRawDataQueue *aSampl
|
||||||
sample->mExtraData->AppendElements(&c[0], 8);
|
sample->mExtraData->AppendElements(&c[0], 8);
|
||||||
}
|
}
|
||||||
aSamples->Push(sample);
|
aSamples->Push(sample);
|
||||||
if (mAudioCodec == NESTEGG_CODEC_VORBIS ||
|
if (mAudioCodec == NESTEGG_CODEC_VORBIS) {
|
||||||
mAudioCodec == NESTEGG_CODEC_OPUS) {
|
|
||||||
tstamp += duration;
|
tstamp += duration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче