diff --git a/content/media/MediaDecoderStateMachine.cpp b/content/media/MediaDecoderStateMachine.cpp index eda5925ce9a9..acf9f29a94e9 100644 --- a/content/media/MediaDecoderStateMachine.cpp +++ b/content/media/MediaDecoderStateMachine.cpp @@ -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. diff --git a/netwerk/protocol/rtsp/rtsp/RTSPSource.cpp b/netwerk/protocol/rtsp/rtsp/RTSPSource.cpp index 7a7b93eabd8f..4eaaf17c90b2 100644 --- a/netwerk/protocol/rtsp/rtsp/RTSPSource.cpp +++ b/netwerk/protocol/rtsp/rtsp/RTSPSource.cpp @@ -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; }