mirror of
https://github.com/mpv-player/mpv
synced 2025-03-07 06:37:46 +00:00
video: fix video end condition
This wasn't really fine, and could (perhaps) cause weird corner cases on reinit or when the player was paused. Before eb9d20, video_left was also set to true if vo->frame_loaded was set, and this variable basically indicated whether the previous update_video() call was successful. This was overlooked when changing everything. Simply always call update_video(), it should be equivalent.
This commit is contained in:
parent
c9ed70b666
commit
ae4613cd3b
@ -983,12 +983,11 @@ void run_playloop(struct MPContext *mpctx)
|
||||
struct vo *vo = mpctx->video_out;
|
||||
update_fps(mpctx);
|
||||
|
||||
int r = 1; // like update_video return value
|
||||
video_left = vo->hasframe || mpctx->playing_last_frame;
|
||||
double frame_time = 0;
|
||||
int r = update_video(mpctx, endpts, false, &frame_time);
|
||||
MP_VERBOSE(mpctx, "update_video: %d\n", r);
|
||||
video_left = r > 0 || vo->hasframe || mpctx->playing_last_frame;
|
||||
if (!mpctx->paused || mpctx->restart_playback) {
|
||||
double frame_time = 0;
|
||||
r = update_video(mpctx, endpts, false, &frame_time);
|
||||
MP_VERBOSE(mpctx, "update_video: %d\n", r);
|
||||
if (r == 0) {
|
||||
if (!mpctx->playing_last_frame && mpctx->last_frame_duration > 0) {
|
||||
mpctx->time_frame += mpctx->last_frame_duration;
|
||||
|
Loading…
Reference in New Issue
Block a user