Backed out changeset 87880c0f7336 (bug 1300703) on request from jya

This commit is contained in:
Carsten "Tomcat" Book 2016-09-07 14:14:31 +02:00
Родитель 6ea7c1b598
Коммит bf5be9e9d9
2 изменённых файлов: 2 добавлений и 26 удалений

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

@ -355,13 +355,6 @@ WebMDemuxer::ReadMetadata()
continue;
}
uint64_t defaultDuration;
r = nestegg_track_default_duration(context, track, &defaultDuration);
if (r >= 0) {
mVideoDefaultDuration =
Some(uint64_t(media::TimeUnit::FromNanoseconds(defaultDuration).ToMicroseconds()));
}
mVideoTrack = track;
mHasVideo = true;
@ -402,13 +395,6 @@ WebMDemuxer::ReadMetadata()
return NS_ERROR_FAILURE;
}
uint64_t defaultDuration;
r = nestegg_track_default_duration(context, track, &defaultDuration);
if (r >= 0) {
mAudioDefaultDuration =
Some(uint64_t(media::TimeUnit::FromNanoseconds(defaultDuration).ToMicroseconds()));
}
mAudioTrack = track;
mHasAudio = true;
mAudioCodec = nestegg_track_codec_id(context, track);
@ -601,11 +587,7 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType, MediaRawDataQueue *aSampl
} else if (!mIsMediaSource ||
(mIsMediaSource && mLastAudioFrameTime.isSome())) {
next_tstamp = tstamp;
if (mAudioDefaultDuration.isSome()) {
next_tstamp += mAudioDefaultDuration.ref();
} else {
next_tstamp += tstamp - mLastAudioFrameTime.refOr(0);
}
next_tstamp += tstamp - mLastAudioFrameTime.refOr(0);
} else {
PushAudioPacket(holder);
}
@ -620,11 +602,7 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType, MediaRawDataQueue *aSampl
} else if (!mIsMediaSource ||
(mIsMediaSource && mLastVideoFrameTime.isSome())) {
next_tstamp = tstamp;
if (mVideoDefaultDuration.isSome()) {
next_tstamp += mVideoDefaultDuration.ref();
} else {
next_tstamp += tstamp - mLastVideoFrameTime.refOr(0);
}
next_tstamp += tstamp - mLastVideoFrameTime.refOr(0);
} else {
PushVideoPacket(holder);
}

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

@ -220,8 +220,6 @@ private:
// previous frame's timestamp. In NS.
Maybe<int64_t> mLastAudioFrameTime;
Maybe<int64_t> mLastVideoFrameTime;
Maybe<uint64_t> mAudioDefaultDuration;
Maybe<uint64_t> mVideoDefaultDuration;
// Codec ID of audio track
int mAudioCodec;