opengl: Replace vlc_gl_Destroy in macosx, glwin32, caopengllayer vouts
authorMarvin Scholz <epirat07@gmail.com>
Wed, 28 Dec 2016 16:45:24 +0000 (17:45 +0100)
committerThomas Guillem <thomas@gllm.fr>
Thu, 29 Dec 2016 12:48:22 +0000 (13:48 +0100)
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.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
modules/video_output/caopengllayer.m
modules/video_output/macosx.m
modules/video_output/win32/glwin32.c

index 62d15d3..ed77118 100644 (file)
@@ -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);
index 7f94d3c..0329741 100644 (file)
@@ -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];
 
index 96ee332..fd1dc36 100644 (file)
@@ -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);