From acd5816a6df9e2de9e8dd307dde12a90717d464a Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 30 Oct 2015 13:26:55 +0100 Subject: video: fix framedrop accounting in display-sync mode Commit a1315c76 broke this slightly. Frame drops got counted multiple times, and also vo.c was actually trying to "render" the dropped frame over and over again (normally not a problem, since frames are always queued "tightly" in display-sync mode, but could have caused 100% CPU usage in some rare corner cases). Do not repeat already dropped frames, but still treat new frames with num_vsyncs==0 as dropped frames. Also, strictly count dropped frames in the VO. This means we don't count "soft" dropped frames anymore (frames that are shown, but for fewer vsyncs than intended). This will be adjusted in the next commit. --- player/video.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'player/video.c') diff --git a/player/video.c b/player/video.c index 1fb54fe75d..af98c676ed 100644 --- a/player/video.c +++ b/player/video.c @@ -1022,8 +1022,6 @@ static void handle_display_sync_frame(struct MPContext *mpctx, // corner cases or exceptional situations cause too much havoc. drop_repeat = MPCLAMP(drop_repeat, -num_vsyncs, num_vsyncs * 10); num_vsyncs += drop_repeat; - if (drop_repeat < 0) - vo_increment_drop_count(vo, 1); // Estimate the video position, so we can calculate a good A/V difference // value below. This is used to estimate A/V drift. -- cgit v1.2.3