mirror of
https://github.com/mpv-player/mpv
synced 2024-11-03 03:19:24 +01:00
vo_gpu: error out if there were rendering errors when taking screenshot
This commit is contained in:
parent
1b786a71c1
commit
ecf4d7a843
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user