Skip to content

Commit

Permalink
lavd/opengl_enc: fix a compiler error
Browse files Browse the repository at this point in the history
glcontext was added under CONFIG_SDL2

libavdevice/opengl_enc.c: In function ‘opengl_draw’:
libavdevice/opengl_enc.c:1204:15: error: ‘OpenGLContext’ has no member
named ‘glcontext’

Signed-off-by: Haihao Xiang <[email protected]>
  • Loading branch information
xhaihao committed Jul 24, 2023
1 parent 13f49a7 commit 5b11ee9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavdevice/opengl_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1200,11 +1200,11 @@ static int opengl_draw(AVFormatContext *h, void *input, int repaint, int is_pkt)
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
int ret;

#if CONFIG_SDL2
/* At this point, opengl->glcontext implies opengl->glcontext */
if (opengl->glcontext)
SDL_GL_MakeCurrent(opengl->window, opengl->glcontext);

#if CONFIG_SDL2
if (!opengl->no_window && (ret = opengl_sdl_process_events(h)) < 0)
goto fail;
#endif
Expand Down

0 comments on commit 5b11ee9

Please sign in to comment.