diff --git a/avplay.c b/avplay.c
index 98fd954be5ae531104591b178dcbec9cec8dac78..5e5518eeaccf812dcc5ef95743f3559349a5b284 100644
--- a/avplay.c
+++ b/avplay.c
@@ -1033,7 +1033,7 @@ static void stream_pause(VideoState *is)
 
 static double compute_target_time(double frame_current_pts, VideoState *is)
 {
-    double delay, sync_threshold, diff;
+    double delay, sync_threshold, diff = 0;
 
     /* compute nominal delay */
     delay = frame_current_pts - is->frame_last_pts;