mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 01:40:15 +00:00
vcap/syphon: handle shader compile err reasonably
The init function is used also in probe, which means that the assert will also aborts capabilities probe for the GUI.
This commit is contained in:
@@ -427,7 +427,11 @@ static int vidcap_syphon_init_common(char *opts, struct state_vidcap_syphon **ou
|
||||
|
||||
if (!s->use_rgb) {
|
||||
s->program_to_yuv422 = glsl_compile_link(NULL, fp_display_rgba_to_yuv422_legacy);
|
||||
assert(s->program_to_yuv422 != 0);
|
||||
if (s->program_to_yuv422 == 0) {
|
||||
MSG(ERROR, "Cannot compile shader for YUV 4:2:2 conversion!\n");
|
||||
vidcap_syphon_done(s);
|
||||
return VIDCAP_INIT_FAIL;
|
||||
}
|
||||
glUseProgram(s->program_to_yuv422);
|
||||
glUniform1i(glGetUniformLocation(s->program_to_yuv422, "image"), 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user