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

Always create a new object with the parent object

parent e5287a68
...@@ -1760,7 +1760,7 @@ static sout_access_out_t *GrabberCreate( sout_stream_t *p_stream ) ...@@ -1760,7 +1760,7 @@ static sout_access_out_t *GrabberCreate( sout_stream_t *p_stream )
{ {
sout_access_out_t *p_grab; 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 ) if( p_grab == NULL )
return NULL; return NULL;
......
...@@ -828,7 +828,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent, ...@@ -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_dec->b_need_packetized && !p_dec->fmt_in.b_packetized )
{ {
p_owner->p_packetizer = p_owner->p_packetizer =
vlc_custom_create( p_dec, sizeof( decoder_t ), vlc_custom_create( p_parent, sizeof( decoder_t ),
VLC_OBJECT_DECODER, "packetizer" ); VLC_OBJECT_DECODER, "packetizer" );
if( p_owner->p_packetizer ) if( p_owner->p_packetizer )
{ {
......
...@@ -146,8 +146,8 @@ vlm_t *vlm_New ( vlc_object_t *p_this ) ...@@ -146,8 +146,8 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
msg_Dbg( p_this, "creating VLM" ); msg_Dbg( p_this, "creating VLM" );
p_vlm = vlc_custom_create( p_this, sizeof( *p_vlm ), VLC_OBJECT_GENERIC, p_vlm = vlc_custom_create( p_this->p_libvlc, sizeof( *p_vlm ),
vlm_object_name ); VLC_OBJECT_GENERIC, vlm_object_name );
if( !p_vlm ) if( !p_vlm )
{ {
vlc_mutex_unlock( &vlm_mutex ); 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 ...@@ -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 ), p_vlm->p_vod = vlc_custom_create( VLC_OBJECT(p_vlm), sizeof( vod_t ),
VLC_OBJECT_GENERIC, "vod server" ); 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 ); p_vlm->p_vod->p_module = module_need( p_vlm->p_vod, "vod server", "$vod-server", false );
if( !p_vlm->p_vod->p_module ) 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 ...@@ -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->i_index = 0;
p_instance->b_sout_keep = false; p_instance->b_sout_keep = false;
p_instance->p_parent = vlc_object_create( p_vlm, sizeof (vlc_object_t) ); 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 = NULL;
p_instance->p_input_resource = NULL; p_instance->p_input_resource = NULL;
......
...@@ -160,7 +160,7 @@ osd_menu_t *osd_MenuCreate( vlc_object_t *p_this, const char *psz_file ) ...@@ -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"; 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 ); VLC_OBJECT_GENERIC, osdmenu_name );
if( !p_osd ) if( !p_osd )
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