diff options
author | wm4 <wm4@nowhere> | 2015-08-01 22:16:52 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-01 22:16:52 +0200 |
commit | ee58e7cfe5c1ed1532f0c0dbe2428811a3382f17 (patch) | |
tree | 2ece48abbe5601b3f678e0ef158799370a04bef2 | |
parent | 63ade8a49ce8181339e0689b9528969fc475a302 (diff) | |
download | mpv-ee58e7cfe5c1ed1532f0c0dbe2428811a3382f17.tar.bz2 mpv-ee58e7cfe5c1ed1532f0c0dbe2428811a3382f17.tar.xz |
vo: correctly account for dropped frames
If the framedrop count happens to be incremented with
vo_increment_drop_count() during rendering, these increments were
counted twice, because these events also set in->dropped_frame.
-rw-r--r-- | video/out/vo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index e538860452..ca00bb1c49 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -677,7 +677,9 @@ static bool render_frame(struct vo *vo) // frame currently drawn, while in->current_frame is the potentially next.) in->current_frame->repeat = true; - if (!in->dropped_frame) { + if (in->dropped_frame) { + in->drop_count += 1; + } else { in->rendering = true; in->hasframe_rendered = true; int64_t prev_drop_count = vo->in->drop_count; @@ -714,9 +716,7 @@ static bool render_frame(struct vo *vo) in->rendering = false; } - if (in->dropped_frame) { - in->drop_count += 1; - } else { + if (!in->dropped_frame) { vo->want_redraw = false; in->want_redraw = false; in->request_redraw = false; |