Skip to content

Commit

Permalink
Cap video render rate at 24
Browse files Browse the repository at this point in the history
  • Loading branch information
alexp-sssup committed Aug 7, 2010
1 parent d96406c commit 0e40bd2
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions flashnet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,7 @@ void NetStream::tick()
else
#endif
streamTime+=1000/frameRate;
//Video has a latency of one frame
videoDecoder->skipUntil(streamTime/*-(1000/frameRate)*/);
/* if(soundStreamId && audioDecoder->almostFull())
{
cout << "fill on full" << endl;
sys->soundManager->fill(soundStreamId);
}*/
videoDecoder->skipUntil(streamTime);
}

bool NetStream::isReady() const
Expand Down Expand Up @@ -516,6 +510,9 @@ void NetStream::execute()
frameRate=videoDecoder->frameRate;
}
sys->addTick(1000/frameRate,this);
//Also ask for a render rate equal to the video one (capped at 24)
float localRenderRate=dmin(frameRate,24);
sys->setRenderRate(localRenderRate);
}
profile->accountTime(chronometer.checkpoint());
if(aborting)
Expand Down

0 comments on commit 0e40bd2

Please sign in to comment.