mplayer.c: Fix timing of first frame.
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 29 Apr 2017 11:09:23 +0000 (11:09 +0000)
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 29 Apr 2017 11:09:23 +0000 (11:09 +0000)
It would usually be displayed twice as long.

git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@37935 b3059339-0415-0410-9bf9-f77b7e298cf2

mplayer.c

index b0d1f1f..3bffb97 100644 (file)
--- a/mplayer.c
+++ b/mplayer.c
@@ -2536,7 +2536,9 @@ static double update_video(int *blit_frame)
             mp_msg(MSGT_CPLAYER, MSGL_V, "pts value < previous\n");
         }
         frame_time = sh_video->pts - sh_video->last_pts;
-        if (!frame_time)
+        // The first frame should be displayed directly,
+        // all others should get a default frame_time
+        if (!frame_time && mpctx->startup_decode_retry == 0)
             frame_time = sh_video->frametime;
         sh_video->last_pts = sh_video->pts;
         advance_timer(frame_time);