[PATCH 1/2] mplayer.c: Fix timing of first frame.

Reimar Döffinger <[email protected]>
Newsgroups gmane.comp.video.mplayer.devel
Message-ID <[email protected]>
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

_______________________________________________
MPlayer-dev-eng mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.