[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
Thu Jul 23 08:09:14 CEST 2009
vlc | branch: 1.0-bugfix | Rémi Duraffort <ivoire at videolan.org> | Wed Jul 22 10:48:46 2009 +0200| [58d364f63fe927f151a09dd88f28f13970bbdfc7] | 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.
(cherry picked from commit 153dd4aa04adbf9d8448d25d711f53bd00a89330)
Signed-off-by: Rémi Duraffort <ivoire at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=58d364f63fe927f151a09dd88f28f13970bbdfc7
---
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 df6b2bb..21b08ba 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