[vlc-devel] commit: opengl: fix an crash/ hang on exit because opengl needs the init and end to be done in the same thread . ( Rémi Duraffort )

git version control git at videolan.org
Wed Jul 22 20:34:40 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Jul 22 10:48:46 2009 +0200| [153dd4aa04adbf9d8448d25d711f53bd00a89330] | committer: Rémi Duraffort 

opengl: fix an crash/hang on exit because opengl needs the init and end to be done in the same thread.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=153dd4aa04adbf9d8448d25d711f53bd00a89330
---

 modules/video_output/opengl.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index d6592a9..04432a0 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -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 );
 }
 




More information about the vlc-devel mailing list