Skip to content

Commit

Permalink
Give up some CPU in sdltheoraplay if we have no frame to draw.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jun 11, 2011
1 parent ee0f917 commit d045313
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/sdltheoraplay.c
Expand Up @@ -236,6 +236,10 @@ static void playfile(const char *fname)
THEORAPLAY_freeVideo(video);
video = NULL;
} // if
else // no new video frame? Give up some CPU.
{
SDL_Delay(10);
} // else

if (!audio)
audio = THEORAPLAY_getAudio(decoder);
Expand Down

0 comments on commit d045313

Please sign in to comment.