[vlc-commits] Always create a new object with the parent object

Rémi Denis-Courmont git at videolan.org
Wed May 25 19:29:42 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 25 19:33:40 2011 +0300| [2078838d5e2f389d86435b1ddb39c9cf381fc728] | committer: Rémi Denis-Courmont

Always create a new object with the parent object

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

 modules/stream_out/rtp.c |    2 +-
 src/input/decoder.c      |    2 +-
 src/input/vlm.c          |    8 ++++----
 src/osd/osd.c            |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 2dbffd0..c8aecfe 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -1760,7 +1760,7 @@ static sout_access_out_t *GrabberCreate( sout_stream_t *p_stream )
 {
     sout_access_out_t *p_grab;
 
-    p_grab = vlc_object_create( p_stream->p_sout, sizeof( *p_grab ) );
+    p_grab = vlc_object_create( p_stream, sizeof( *p_grab ) );
     if( p_grab == NULL )
         return NULL;
 
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 8ff0cd8..1c771fc 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -828,7 +828,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
         p_dec->b_need_packetized && !p_dec->fmt_in.b_packetized )
     {
         p_owner->p_packetizer =
-            vlc_custom_create( p_dec, sizeof( decoder_t ),
+            vlc_custom_create( p_parent, sizeof( decoder_t ),
                                VLC_OBJECT_DECODER, "packetizer" );
         if( p_owner->p_packetizer )
         {
diff --git a/src/input/vlm.c b/src/input/vlm.c
index 977d84f..126a1db 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -146,8 +146,8 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
 
     msg_Dbg( p_this, "creating VLM" );
 
-    p_vlm = vlc_custom_create( p_this, sizeof( *p_vlm ), VLC_OBJECT_GENERIC,
-                               vlm_object_name );
+    p_vlm = vlc_custom_create( p_this->p_libvlc, sizeof( *p_vlm ),
+                               VLC_OBJECT_GENERIC, vlm_object_name );
     if( !p_vlm )
     {
         vlc_mutex_unlock( &vlm_mutex );
@@ -761,7 +761,7 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
     {
         p_vlm->p_vod = vlc_custom_create( VLC_OBJECT(p_vlm), sizeof( vod_t ),
                                           VLC_OBJECT_GENERIC, "vod server" );
-        vlc_object_attach( p_vlm->p_vod, p_vlm->p_libvlc );
+        vlc_object_attach( p_vlm->p_vod, p_vlm );
         p_vlm->p_vod->p_module = module_need( p_vlm->p_vod, "vod server", "$vod-server", false );
         if( !p_vlm->p_vod->p_module )
         {
@@ -903,7 +903,7 @@ static vlm_media_instance_sys_t *vlm_MediaInstanceNew( vlm_t *p_vlm, const char
     p_instance->i_index = 0;
     p_instance->b_sout_keep = false;
     p_instance->p_parent = vlc_object_create( p_vlm, sizeof (vlc_object_t) );
-    vlc_object_attach( p_instance->p_parent, p_vlm->p_libvlc );
+    vlc_object_attach( p_instance->p_parent, p_vlm );
     p_instance->p_input = NULL;
     p_instance->p_input_resource = NULL;
 
diff --git a/src/osd/osd.c b/src/osd/osd.c
index 21bd762..794f805 100644
--- a/src/osd/osd.c
+++ b/src/osd/osd.c
@@ -160,7 +160,7 @@ osd_menu_t *osd_MenuCreate( vlc_object_t *p_this, const char *psz_file )
     {
         static const char osdmenu_name[] = "osd menu";
 
-        p_osd = vlc_custom_create( p_this, sizeof( *p_osd ),
+        p_osd = vlc_custom_create( p_this->p_libvlc, sizeof( *p_osd ),
                                    VLC_OBJECT_GENERIC, osdmenu_name );
         if( !p_osd )
             return NULL;



More information about the vlc-commits mailing list