From a1771ed0d451a0af75529429fee2c370671950e4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 10 Apr 2020 01:28:06 +0200 Subject: [PATCH] video: avoid redundant self-wakeup on each queued frame This should be unnecessary, since the VO itself performs wakeups once a new frame can be queued. The only situation I can think of where this might be required are EOF situations (which are always strange). If I'm wrong, there'll be fun new bugs, probably causing frame drops or temporary stalls. --- player/video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/player/video.c b/player/video.c index 2e0c8f6460..bae32c3f4e 100644 --- a/player/video.c +++ b/player/video.c @@ -1241,7 +1241,8 @@ void write_video(struct MPContext *mpctx) vo_c->underrun_signaled = false; - mp_wakeup_core(mpctx); + if (mpctx->video_status == STATUS_EOF || mpctx->stop_play) + mp_wakeup_core(mpctx); return; error: