From 76a92fd30b0fc12da024eb1187756d6432f8ab13 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 16 Dec 2019 01:15:43 +0100 Subject: player: avoid underrun wakeup loop The VO underrun detection (just a weak heuristic) added in commit f26dfb flagged the underrun state every time it was checked, and since the check happened in every playloop iteration, this caused the playloop to wake up itself on every iteration. It burned an entire core while in this state. Fix this by flagging this condition only once (as it should be), and requiring that a frame is displayed to trigger it again. This makes it work similar as the audio underrun check. The bug report referenced below says --demuxer-thread=no avoided this. This is because the demuxer layer doesn't do proper underrun reporting if the reader thread is disabled. Fixes: #7259 --- player/core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'player/core.h') diff --git a/player/core.h b/player/core.h index fb88c8d0f0..c300c82df9 100644 --- a/player/core.h +++ b/player/core.h @@ -184,6 +184,7 @@ struct vo_chain { bool is_sparse; bool underrun; + bool underrun_signaled; }; // Like vo_chain, for audio. -- cgit v1.2.3