[MPlayer-dev-eng] [PATCH 1/2] mplayer.c: Fix timing of first frame.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Mar 8 01:15:48 EET 2017


It would usually be displayed twice as long.
---
 mplayer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mplayer.c b/mplayer.c
index b0d1f1f19..3bffb9792 100644
--- 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);
-- 
2.11.0



More information about the MPlayer-dev-eng mailing list