summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-06-06 12:26:37 +0200
committerwm4 <wm4@nowhere>2020-06-06 12:26:37 +0200
commit5ad73ccbe9e9a736e7545e99879bf7acf9cb01f9 (patch)
tree8de7d4adb8c6a1bbb155c5716afc3128fc2deb77
parent7174c063de69e10ef1d860895c23941355960e8e (diff)
downloadmpv-5ad73ccbe9e9a736e7545e99879bf7acf9cb01f9.tar.bz2
mpv-5ad73ccbe9e9a736e7545e99879bf7acf9cb01f9.tar.xz
vo_gpu: fix display corruption with window screenshots
The "screenshot window" command (ctrl+s by default) somehow broke video colors with --gpu-api=vulkan --profile=gpu-hq when playback was paused. I don't know the cause, but the rest of the code seems to imply gl_video_reset_surfaces() needs to be called manually to flush some caches, and it fixes the issue, so I assume there's no great mystery here.
-rw-r--r--video/out/gpu/video.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index dbe562ca8f..74ff85f210 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -3458,6 +3458,7 @@ done:
talloc_free(nframe);
ra_tex_free(p->ra, &target);
gl_video_resize(p, &old_src, &old_dst, &old_osd);
+ gl_video_reset_surfaces(p);
if (!ok)
TA_FREEP(&res);
args->res = res;