mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
player: assume video forwards timestamps jumps only with some formats
Another crappy fix for timestamp reset issues. This time, we try to fix files which have very weird but legitimate frame durations, such as cdgraphics. It can have many short frames, but once in a while there are potentially very long frames. Fixes #3027.
This commit is contained in:
@@ -685,7 +685,7 @@ static void handle_new_frame(struct MPContext *mpctx)
|
||||
double pts = mpctx->next_frames[0]->pts;
|
||||
if (mpctx->video_pts != MP_NOPTS_VALUE) {
|
||||
frame_time = pts - mpctx->video_pts;
|
||||
double tolerance = 15;
|
||||
double tolerance = mpctx->demuxer->ts_resets_possible ? 5 : 1e4;
|
||||
if (frame_time <= 0 || frame_time >= tolerance) {
|
||||
// Assume a discontinuity.
|
||||
MP_WARN(mpctx, "Invalid video timestamp: %f -> %f\n",
|
||||
|
||||
Reference in New Issue
Block a user