diff mbox series

[FFmpeg-devel] lavd/opengl_enc: fix a compiler error

Message ID 20230719075404.294478-1-haihao.xiang@intel.com
State Accepted
Commit 5b11ee94299fe4e07d3921a3b8f29fff72e1daa1
Headers show
Series [FFmpeg-devel] lavd/opengl_enc: fix a compiler error | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Xiang, Haihao July 19, 2023, 7:54 a.m. UTC
From: Haihao Xiang <haihao.xiang@intel.com>

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 <haihao.xiang@intel.com>
---
 libavdevice/opengl_enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Xiang, Haihao July 20, 2023, 2:18 a.m. UTC | #1
On Wo, 2023-07-19 at 15:54 +0800, Xiang, Haihao wrote:
> From: Haihao Xiang <haihao.xiang@intel.com>
> 
> 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 <haihao.xiang@intel.com>
> ---
>  libavdevice/opengl_enc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
> index 8d059343fb..f9dc846bf1 100644
> --- a/libavdevice/opengl_enc.c
> +++ b/libavdevice/opengl_enc.c
> @@ -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

Will apply

- Haihao
diff mbox series

Patch

diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index 8d059343fb..f9dc846bf1 100644
--- a/libavdevice/opengl_enc.c
+++ b/libavdevice/opengl_enc.c
@@ -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