mirror of
https://github.com/mpv-player/mpv
synced 2025-02-05 22:52:18 +00:00
video: take first frame into account in audio-sync mode
It appears commit 4ad68d9452
broke handling the first video
frame duration through roundabout ways (I think because the duration of
the first frame was now available at all in the normal case). The first
frame was cut short, which showed up especially with looping, or if the
file had a low FPS.
This questionable change seems to fix it without breaking any other
known cases => push and call it a day.
The display-sync mode did not have this problem.
Fixes: #7150
This commit is contained in:
parent
b6413f82b2
commit
6bbf44d842
@ -384,10 +384,9 @@ static void handle_new_frame(struct MPContext *mpctx)
|
||||
}
|
||||
}
|
||||
mpctx->delay -= frame_time;
|
||||
if (mpctx->video_status >= STATUS_PLAYING) {
|
||||
mpctx->time_frame += frame_time / mpctx->video_speed;
|
||||
mpctx->time_frame += frame_time / mpctx->video_speed;
|
||||
if (mpctx->video_status >= STATUS_PLAYING)
|
||||
adjust_sync(mpctx, pts, frame_time);
|
||||
}
|
||||
MP_TRACE(mpctx, "frametime=%5.3f\n", frame_time);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user