]> git.sesse.net Git - vlc/commitdiff
opengl: fix an crash/hang on exit because opengl needs the init and end to be done...
authorRémi Duraffort <ivoire@videolan.org>
Wed, 22 Jul 2009 08:48:46 +0000 (10:48 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Wed, 22 Jul 2009 18:24:26 +0000 (20:24 +0200)
modules/video_output/opengl.c

index d6592a943fd85170057012d3dc14dff1c7f1488c..04432a00746755052d06e85b8be20864f1626e6c 100644 (file)
@@ -388,6 +388,11 @@ static void End( vout_thread_t *p_vout )
     {
         p_sys->p_vout->pf_unlock( p_sys->p_vout );
     }
+
+    /* We must release the opengl provider here: opengl requiere init and end
+       to be done in the same thread */
+    module_unneed( p_sys->p_vout, p_sys->p_vout->p_module );
+    vlc_object_release( p_sys->p_vout );
 }
 
 /*****************************************************************************
@@ -400,9 +405,6 @@ static void DestroyVout( vlc_object_t *p_this )
     vout_thread_t *p_vout = (vout_thread_t *)p_this;
     vout_sys_t *p_sys = p_vout->p_sys;
 
-    module_unneed( p_sys->p_vout, p_sys->p_vout->p_module );
-    vlc_object_release( p_sys->p_vout );
-
     free( p_sys );
 }