p_vlm = *pp_vlm;
if( p_vlm )
{ /* VLM already exists */
- vlc_object_yield( p_vlm );
+ vlc_object_hold( p_vlm );
vlc_mutex_unlock( lockval.p_address );
return p_vlm;
}
int64_t vlm_Date(void)
{
-#ifdef WIN32
+#if defined (WIN32) && !defined (UNDER_CE)
struct timeb tm;
ftime( &tm );
return ((int64_t)tm.time) * 1000000 + ((int64_t)tm.millitm) * 1000;
mtime_t i_lastcheck;
mtime_t i_time;
+ int canc = vlc_savecancel ();
i_lastcheck = vlm_Date();
while( !vlm->b_die )
msleep( 100000 );
}
+ vlc_restorecancel (canc);
return NULL;
}
for( i = 0; i < p_cfg->i_option; i++ )
input_item_AddOption( p_media->vod.p_item,
- p_cfg->ppsz_option[i] );
+ p_cfg->ppsz_option[i] );
if( asprintf( &psz_header, _("Media: %s"), p_cfg->psz_name ) == -1 )
psz_header = NULL;
msleep( 100000 );
input_StopThread( p_input );
+ vlc_thread_join( p_input );
vlc_object_release( p_input );
}
free( psz_header );
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_vlm->p_vod->p_module = module_Need( p_vlm->p_vod, "vod server", 0, 0 );
+ p_vlm->p_vod->p_module = module_need( p_vlm->p_vod, "vod server", 0, 0 );
if( !p_vlm->p_vod->p_module )
{
msg_Err( p_vlm, "cannot find vod server" );
vlc_object_detach( p_vlm->p_vod );
vlc_object_release( p_vlm->p_vod );
- p_vlm->p_vod = 0;
+ p_vlm->p_vod = NULL;
return VLC_EGENERIC;
}
/* Check if we need to unload the VOD server */
if( p_vlm->p_vod && p_vlm->i_vod <= 0 )
{
- module_Unneed( p_vlm->p_vod, p_vlm->p_vod->p_module );
+ module_unneed( p_vlm->p_vod, p_vlm->p_vod->p_module );
vlc_object_detach( p_vlm->p_vod );
vlc_object_release( p_vlm->p_vod );
p_vlm->p_vod = NULL;
if( p_input )
{
input_StopThread( p_input );
- p_instance->p_sout = input_DetachSout( p_input );
vlc_thread_join( p_input );
+ p_instance->p_sout = input_DetachSout( p_input );
vlc_object_release( p_input );
}
if( p_instance->p_sout )
}
input_StopThread( p_input );
- p_instance->p_sout = input_DetachSout( p_input );
vlc_thread_join( p_input );
+ p_instance->p_sout = input_DetachSout( p_input );
vlc_object_release( p_input );
if( !p_instance->b_sout_keep && p_instance->p_sout )
{