[vlc-devel] commit: vout: trivial code factorization ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon Jan 12 19:33:38 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Mon Jan 12 20:33:24 2009 +0200| [acb58aa6a0ebf41b474b8bed3f3b46b1cc2afcaf] | committer: Rémi Denis-Courmont 

vout: trivial code factorization

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

 src/video_output/video_output.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index cd27da6..463f35a 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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 );
     free( psz_name );
 
+    vlc_object_set_destructor( p_vout, vout_Destructor );
+
     if( p_vout->p_module == NULL )
     {
         msg_Err( p_vout, "no suitable vout module" );
-        vlc_object_set_destructor( p_vout, vout_Destructor );
         vlc_object_release( p_vout );
         return NULL;
     }
@@ -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 );
         p_vout->p_module = NULL;
-        vlc_object_set_destructor( p_vout, vout_Destructor );
         vlc_object_release( p_vout );
         return NULL;
     }
@@ -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_object_set_destructor( p_vout, vout_Destructor );
-
     if( p_vout->b_error )
     {
         msg_Err( p_vout, "video output creation failed" );




More information about the vlc-devel mailing list