summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-07 21:14:43 +0100
committerwm4 <wm4@nowhere>2015-02-07 21:14:43 +0100
commit0ab1509f147fb939724959c765c4f5ecd4e12eaf (patch)
tree3f1efdf30a3fa187d7c5477a3255698c5d31290c
parent75edecb526bee29a9adee5946ef5baf26b27e8b0 (diff)
downloadmpv-0ab1509f147fb939724959c765c4f5ecd4e12eaf.tar.bz2
mpv-0ab1509f147fb939724959c765c4f5ecd4e12eaf.tar.xz
vo: minor simplification
Whatever.
-rw-r--r--video/out/vo.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index 54f0a92d39..10105c35aa 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -565,7 +565,6 @@ static bool render_frame(struct vo *vo)
if (img)
mp_image_setrefp(&in->current_frame, img);
- in->rendering = true;
in->frame_queued = NULL;
// The next time a flip (probably) happens.
@@ -600,7 +599,6 @@ static bool render_frame(struct vo *vo)
|| in->dropped_frame))
{
in->dropped_frame = false;
- in->rendering = false;
goto nothing_done;
}
}
@@ -608,6 +606,7 @@ static bool render_frame(struct vo *vo)
if (in->dropped_frame) {
talloc_free(img);
} else {
+ in->rendering = true;
in->hasframe_rendered = true;
pthread_mutex_unlock(&in->lock);
mp_input_wakeup(vo->input_ctx); // core can queue new video now
@@ -648,24 +647,20 @@ static bool render_frame(struct vo *vo)
in->vsync_interval_approx = in->last_flip - prev_flip;
- long phase = in->last_flip % in->vsync_interval;
- MP_DBG(vo, "phase: %ld\n", phase);
- MP_STATS(vo, "value %ld phase", phase);
-
MP_STATS(vo, "end video");
pthread_mutex_lock(&in->lock);
in->dropped_frame = drop;
+ in->rendering = false;
}
- if (in->dropped_frame)
+ if (in->dropped_frame) {
in->drop_count += 1;
-
- vo->want_redraw = false;
-
- in->want_redraw = false;
- in->request_redraw = false;
- in->rendering = false;
+ } else {
+ vo->want_redraw = false;
+ in->want_redraw = false;
+ in->request_redraw = false;
+ }
pthread_cond_signal(&in->wakeup); // for vo_wait_frame()
mp_input_wakeup(vo->input_ctx);