Commit 8987cc14 authored by Gildas Bazin's avatar Gildas Bazin

* src/video_output/video_output.c: make sure vout_Create() returns NULL when...

* src/video_output/video_output.c: make sure vout_Create() returns NULL when the pf_init() of the vout plugin failed.
parent 30a54d61
...@@ -472,6 +472,20 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, ...@@ -472,6 +472,20 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent,
{ {
msg_Err( p_vout, "out of memory" ); msg_Err( p_vout, "out of memory" );
module_Unneed( p_vout, p_vout->p_module ); module_Unneed( p_vout, p_vout->p_module );
vlc_object_detach( p_vout );
vlc_object_destroy( p_vout );
return NULL;
}
if( p_vout->b_error )
{
msg_Err( p_vout, "video output creation failed" );
/* Make sure the thread is destroyed */
p_vout->b_die = VLC_TRUE;
vlc_thread_join( p_vout );
vlc_object_detach( p_vout );
vlc_object_destroy( p_vout ); vlc_object_destroy( p_vout );
return NULL; return NULL;
} }
......
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