summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/gpu/video.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index 11c984615d..91a405f25e 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -3154,7 +3154,8 @@ done:
debug_check_gl(p, "after OSD rendering");
}
- if (gl_sc_error_state(p->sc) || p->broken_frame) {
+ p->broken_frame |= gl_sc_error_state(p->sc);
+ if (p->broken_frame) {
// Make the screen solid blue to make it visually clear that an
// error has occurred
float color[4] = {0.0, 0.05, 0.5, 1.0};
@@ -3237,6 +3238,9 @@ void gl_video_screenshot(struct gl_video *p, struct vo_frame *frame,
if (!p->ra->fns->tex_download(p->ra, &download_params))
goto done;
+ if (p->broken_frame)
+ goto done;
+
ok = true;
done:
ra_tex_free(p->ra, &target);