Commit acb58aa6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vout: trivial code factorization

parent 2d090d81
...@@ -476,10 +476,11 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt ) ...@@ -476,10 +476,11 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
"video filter" : "video output", psz_name, p_vout->p->psz_filter_chain && *p_vout->p->psz_filter_chain ); "video filter" : "video output", psz_name, p_vout->p->psz_filter_chain && *p_vout->p->psz_filter_chain );
free( psz_name ); free( psz_name );
vlc_object_set_destructor( p_vout, vout_Destructor );
if( p_vout->p_module == NULL ) if( p_vout->p_module == NULL )
{ {
msg_Err( p_vout, "no suitable vout module" ); msg_Err( p_vout, "no suitable vout module" );
vlc_object_set_destructor( p_vout, vout_Destructor );
vlc_object_release( p_vout ); vlc_object_release( p_vout );
return NULL; return NULL;
} }
...@@ -521,7 +522,6 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt ) ...@@ -521,7 +522,6 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
{ {
module_unneed( p_vout, p_vout->p_module ); module_unneed( p_vout, p_vout->p_module );
p_vout->p_module = NULL; p_vout->p_module = NULL;
vlc_object_set_destructor( p_vout, vout_Destructor );
vlc_object_release( p_vout ); vlc_object_release( p_vout );
return NULL; return NULL;
} }
...@@ -535,8 +535,6 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt ) ...@@ -535,8 +535,6 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
} }
vlc_mutex_unlock( &p_vout->change_lock ); vlc_mutex_unlock( &p_vout->change_lock );
vlc_object_set_destructor( p_vout, vout_Destructor );
if( p_vout->b_error ) if( p_vout->b_error )
{ {
msg_Err( p_vout, "video output creation failed" ); msg_Err( p_vout, "video output creation failed" );
......
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