aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-08-24 00:32:10 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-08-24 00:32:10 +0000
commitcc1f91d7717894e1120ec310ec6b9cf5abfee107 (patch)
tree5e1958f15da042ff12f9f8de0b924da13102fc85 /ffplay.c
parent5972945197d44e8bde6a986b9cba2e8196cfbc9c (diff)
downloadffmpeg-cc1f91d7717894e1120ec310ec6b9cf5abfee107.tar.gz
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
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index 7ea077d3bd..1119b4fe00 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -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);
}