[vlc-devel] [PATCH 1/2] opengl: Replace vlc_gl_Destroy in macosx, glwin32, caopengllayer vouts
Thomas Guillem
thomas at gllm.fr
Thu Dec 29 13:47:02 CET 2016
LGTM, I will apply.
On Wed, Dec 28, 2016, at 17:45, Marvin Scholz wrote:
> Some vouts like macosx and glwin32 do not use vlc_gl_Create to create a
> vlc_gl_t, and set no module but vlc_gl_Destroy expects that a module is
> set and will therefore fail for these vouts.
>
> This commit replaces vlc_gl_Destroy in these vouts with direct calls to
> vlc_object_release.
> ---
> modules/video_output/caopengllayer.m | 2 +-
> modules/video_output/macosx.m | 2 +-
> modules/video_output/win32/glwin32.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/modules/video_output/caopengllayer.m
> b/modules/video_output/caopengllayer.m
> index 62d15d3..ed77118 100644
> --- a/modules/video_output/caopengllayer.m
> +++ b/modules/video_output/caopengllayer.m
> @@ -308,7 +308,7 @@ static void Close (vlc_object_t *p_this)
> }
>
> if (sys->gl != NULL)
> - vlc_gl_Destroy(sys->gl);
> + vlc_object_release(sys->gl);
>
> if (sys->glContext)
> CGLReleaseContext(sys->glContext);
> diff --git a/modules/video_output/macosx.m
> b/modules/video_output/macosx.m
> index 7f94d3c..0329741 100644
> --- a/modules/video_output/macosx.m
> +++ b/modules/video_output/macosx.m
> @@ -326,7 +326,7 @@ void Close (vlc_object_t *this)
> vout_display_opengl_Delete (sys->vgl);
>
> if (sys->gl != NULL)
> - vlc_gl_Destroy (sys->gl);
> + vlc_object_release(sys->gl);
>
> [sys->glView release];
>
> diff --git a/modules/video_output/win32/glwin32.c
> b/modules/video_output/win32/glwin32.c
> index 96ee332..fd1dc36 100644
> --- a/modules/video_output/win32/glwin32.c
> +++ b/modules/video_output/win32/glwin32.c
> @@ -265,7 +265,7 @@ static void Close(vlc_object_t *object)
> vout_display_opengl_Delete(sys->vgl);
>
> if (sys->gl)
> - vlc_gl_Destroy(sys->gl);
> + vlc_object_release(sys->gl);
>
> if (sys->hGLDC && sys->hGLRC)
> wglMakeCurrent(NULL, NULL);
> --
> 2.10.1 (Apple Git-78)
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list