1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

Ensure that SDL_AddTimer() is never called with a delay of 0 because

this leads to a runaway creation of timers. We never pass 0 currently
but it is safer to check for it explicitly as changes to the code can
easily lead to 0 being used.

Originally committed as revision 14934 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-08-24 00:32:10 +00:00
parent 5972945197
commit cc1f91d771

View File

@ -916,6 +916,7 @@ static Uint32 sdl_refresh_timer_cb(Uint32 interval, void *opaque)
/* schedule a video refresh in 'delay' ms */
static void schedule_refresh(VideoState *is, int delay)
{
if(!delay) delay=1; //SDL seems to be buggy when the delay is 0
SDL_AddTimer(delay, sdl_refresh_timer_cb, is);
}