|author||wm4 <wm4@nowhere>||2015-10-30 13:26:55 +0100|
|committer||wm4 <wm4@nowhere>||2015-10-30 13:26:55 +0100|
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.
Diffstat (limited to 'player/video.c')
1 files changed, 0 insertions, 2 deletions
diff --git a/player/video.c b/player/video.c
index 1fb54fe75d..af98c676ed 100644
@@ -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.