summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--player/video.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/player/video.c b/player/video.c
index 77fec470b4..6ea42ea842 100644
--- a/player/video.c
+++ b/player/video.c
@@ -637,6 +637,13 @@ void write_video(struct MPContext *mpctx, double endpts)
if (!mpctx->d_video)
return;
+ // Actual playback starts when both audio and video are ready.
+ if (mpctx->video_status == STATUS_READY)
+ return;
+
+ if (mpctx->paused && mpctx->video_status >= STATUS_READY)
+ return;
+
update_fps(mpctx);
double frame_time = 0;
@@ -680,13 +687,6 @@ void write_video(struct MPContext *mpctx, double endpts)
MP_TRACE(mpctx, "filtering more video\n");
}
- // Actual playback starts when both audio and video are ready.
- if (mpctx->video_status == STATUS_READY)
- return;
-
- if (mpctx->paused && mpctx->video_status >= STATUS_READY)
- return;
-
mpctx->time_frame -= get_relative_time(mpctx);
if (!mpctx->sync_audio_to_video || mpctx->video_status < STATUS_READY) {
mpctx->time_frame = 0;