Commit 3485cfbe authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Still allocate unique input item IDs

parent dae39fd7
...@@ -501,6 +501,10 @@ input_item_t *input_item_NewWithType( vlc_object_t *p_obj, const char *psz_uri, ...@@ -501,6 +501,10 @@ input_item_t *input_item_NewWithType( vlc_object_t *p_obj, const char *psz_uri,
input_item_Init( p_obj, p_input ); input_item_Init( p_obj, p_input );
vlc_gc_init( p_input, input_item_Destroy ); vlc_gc_init( p_input, input_item_Destroy );
vlc_object_lock( p_obj->p_libvlc );
p_input->i_id = ++priv->i_last_input_id;
vlc_object_unlock( p_obj->p_libvlc );
p_input->b_fixed_name = false; p_input->b_fixed_name = false;
if( psz_uri ) if( psz_uri )
......
...@@ -819,6 +819,8 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, ...@@ -819,6 +819,8 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
vlc_mutex_init( &p_libvlc->p_stats->lock ); vlc_mutex_init( &p_libvlc->p_stats->lock );
priv->p_stats_computer = NULL; priv->p_stats_computer = NULL;
priv->i_last_input_id = 0; /* Not very safe, should be removed */
/* /*
* Initialize hotkey handling * Initialize hotkey handling
*/ */
......
...@@ -206,6 +206,8 @@ typedef struct libvlc_priv_t ...@@ -206,6 +206,8 @@ typedef struct libvlc_priv_t
vlc_mutex_t config_lock; ///< config file lock vlc_mutex_t config_lock; ///< config file lock
char * psz_configfile; ///< location of config file char * psz_configfile; ///< location of config file
int i_last_input_id ; ///< Last id of input item
/* Messages */ /* Messages */
msg_bank_t msg_bank; ///< The message bank msg_bank_t msg_bank; ///< The message bank
int i_verbose; ///< info messages int i_verbose; ///< info messages
......
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