Commit 1b031a9c authored by Eric Petit's avatar Eric Petit

macosx/vout*: fixed a possible segfault on vout close

parent d55a4d46
...@@ -67,9 +67,10 @@ ...@@ -67,9 +67,10 @@
int initDone; int initDone;
} }
- (id) initWithFrame: (NSRect) frame vout: (vout_thread_t*) p_vout; - (id) initWithFrame: (NSRect) frame vout: (vout_thread_t*) p_vout;
- (void) initTextures; - (void) initTextures;
- (void) reloadTexture: (int) index; - (void) reloadTexture: (int) index;
- (void) cleanUp;
@end @end
......
...@@ -455,6 +455,11 @@ void E_(CloseVideo) ( vlc_object_t *p_this ) ...@@ -455,6 +455,11 @@ void E_(CloseVideo) ( vlc_object_t *p_this )
{ {
vout_thread_t * p_vout = (vout_thread_t *)p_this; vout_thread_t * p_vout = (vout_thread_t *)p_this;
if( p_vout->p_sys->i_opengl )
{
[p_vout->p_sys->o_glview cleanUp];
}
if( CoDestroyWindow( p_vout ) ) if( CoDestroyWindow( p_vout ) )
{ {
msg_Err( p_vout, "unable to destroy window" ); msg_Err( p_vout, "unable to destroy window" );
...@@ -1588,6 +1593,11 @@ CATCH_MOUSE_EVENTS ...@@ -1588,6 +1593,11 @@ CATCH_MOUSE_EVENTS
p_vout->p_sys->p_data[index] ); p_vout->p_sys->p_data[index] );
} }
- (void) cleanUp
{
initDone = 0;
}
- (void) drawQuad - (void) drawQuad
{ {
glBegin( GL_QUADS ); glBegin( GL_QUADS );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment