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:
Jean-Yves Avenard 2016-01-23 12:39:48 +11:00
Родитель 66c6ef708f
Коммит 30a05ebd7f
1 изменённых файлов: 1 добавлений и 15 удалений

Просмотреть файл

@ -29,8 +29,6 @@
#include "vpx/vp8dx.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__))
namespace mozilla {
@ -580,17 +578,6 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType, MediaRawDataQueue *aSampl
FramesToTimeUnit(nsamples, mInfo.mAudio.mRate).ToMicroseconds();
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:
break;
}
@ -625,8 +612,7 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType, MediaRawDataQueue *aSampl
sample->mExtraData->AppendElements(&c[0], 8);
}
aSamples->Push(sample);
if (mAudioCodec == NESTEGG_CODEC_VORBIS ||
mAudioCodec == NESTEGG_CODEC_OPUS) {
if (mAudioCodec == NESTEGG_CODEC_VORBIS) {
tstamp += duration;
}
}