summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-10-06 20:32:45 +0200
committerDudemanguy <random342@airmail.cc>2023-10-07 17:50:50 +0000
commit44c398c3e133379e01f06c89fd78b6692694849c (patch)
treec9aac577cf53ba4a7a995bb79bc3c8dc7878812e /player/video.c
parent9d8dfc7b49380b8c03546ed4fad2385c42438a50 (diff)
downloadmpv-44c398c3e133379e01f06c89fd78b6692694849c.tar.bz2
mpv-44c398c3e133379e01f06c89fd78b6692694849c.tar.xz
Revert "video: remove another redundant wakeup"
vo_still_displaying() is racey with vo_request_wakeup_on_done() and above that it doesn't work as expected. VO can run out of work and go to sleep for 1000s, while the play thread still returns on vo_still_displaying() check, because of a check `now < frame_end` so it never advances and go to sleep itself. This fixes dead lock that we have when image parameters changes during playback. This reverts commit 0c9ac5835be70ae26e4aa875e833fe2c7b3b3bf3. Fixes: #12575
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/player/video.c b/player/video.c
index 4f68a97515..390cc26a9c 100644
--- a/player/video.c
+++ b/player/video.c
@@ -1160,10 +1160,8 @@ void write_video(struct MPContext *mpctx)
struct mp_image_params *p = &mpctx->next_frames[0]->params;
if (!vo->params || !mp_image_params_equal(p, vo->params)) {
// Changing config deletes the current frame; wait until it's finished.
- if (vo_still_displaying(vo)) {
- vo_request_wakeup_on_done(vo);
+ if (vo_still_displaying(vo))
return;
- }
const struct vo_driver *info = mpctx->video_out->driver;
char extra[20] = {0};