diff options
-rw-r--r-- | libavdevice/opengl_enc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c index 88c413ee63..8d059343fb 100644 --- a/libavdevice/opengl_enc.c +++ b/libavdevice/opengl_enc.c @@ -1200,6 +1200,10 @@ 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; + /* 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; |