mirror of https://github.com/mpv-player/mpv
video: exit early when nothing to do
These cases were probably confusing. Exit early, which makes it much clearer what's going on. Should not change anything functionally.
This commit is contained in:
parent
d4e0fc76bb
commit
311ce60b16
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue