Bug 1080464 - [RTSP] Live stream frames are not rendered. r=ettseng r=bechen

--HG--
extra : rebase_source : aac290fc9cc887bd1a7a641b894a445ef4098c67
This commit is contained in:
Jonathan Hao 2014-10-13 11:30:26 +08:00
Родитель c35c6c6fb7
Коммит 6883968eb3
2 изменённых файлов: 5 добавлений и 3 удалений

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

@ -2707,7 +2707,8 @@ void MediaDecoderStateMachine::AdvanceFrame()
// Filter out invalid frames by checking the frame time. FrameTime could be
// zero if it's a initial frame.
int64_t frameTime = currentFrame->mTime - mStartTime;
if (frameTime > 0 || (frameTime == 0 && mPlayDuration == 0)) {
if (frameTime > 0 || (frameTime == 0 && mPlayDuration == 0) ||
mScheduler->IsRealTime()) {
ReentrantMonitorAutoExit exitMon(mDecoder->GetReentrantMonitor());
// If we have video, we want to increment the clock in steps of the frame
// duration.

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

@ -231,9 +231,10 @@ void RTSPSource::performPlay(int64_t playTimeUs) {
int64_t duration = 0;
getDuration(&duration);
MOZ_ASSERT(playTimeUs < duration,
MOZ_ASSERT(duration == 0 || playTimeUs < duration,
"Should never receive an out of bounds play time!");
if (playTimeUs >= duration) {
if (duration > 0 && playTimeUs >= duration) {
// if not a live stream and play time out of bounds
return;
}