[vlc-devel] commit: spu_Create: attach object before calling var_Inherit ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Feb 13 10:53:30 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 13 11:53:18 2010 +0200| [0b32594e96173ee219302965b8154dcb3af3cc52] | committer: Rémi Denis-Courmont 

spu_Create: attach object before calling var_Inherit

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

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

diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 11a1fd8..b698b74 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -198,9 +198,9 @@ spu_t *spu_Create( vlc_object_t *p_this )
  
     p_spu = vlc_custom_create( p_this, sizeof(spu_t) + sizeof(spu_private_t),
                                VLC_OBJECT_GENERIC, "subpicture" );
-
     if( !p_spu )
         return NULL;
+    vlc_object_attach( p_spu, p_this );
 
     /* Initialize spu fields */
     p_spu->pf_control = SpuControl;
@@ -221,8 +221,6 @@ spu_t *spu_Create( vlc_object_t *p_this )
     /* Register the default subpicture channel */
     p_sys->i_channel = 2;
 
-    vlc_object_attach( p_spu, p_this );
-
     p_sys->psz_chain_update = NULL;
     p_sys->p_chain = filter_chain_New( p_spu, "sub filter", false,
                                        SubFilterAllocationInit,




More information about the vlc-devel mailing list