static void UpdateItemLength( input_thread_t *p_input, int64_t i_length )
{
input_item_SetDuration( p_input->p->input.p_item, (mtime_t) i_length );
-
- if( !p_input->b_preparsing )
- {
- pl_Yield( p_input );
- var_SetInteger( libvlc_priv (p_input->p_libvlc)->p_playlist,
- "item-change", p_input->p->input.p_item->i_id );
- pl_Release( p_input );
- }
}
/*****************************************************************************
}
/*****************************************************************************
- * An input item's meta has changed (Event Callback)
+ * An input item's meta or duration has changed (Event Callback)
*****************************************************************************/
-static void input_item_meta_changed( const vlc_event_t * p_event,
- void * user_data )
+static void input_item_changed( const vlc_event_t * p_event,
+ void * user_data )
{
playlist_item_t * p_item = user_data;
var_SetInteger( p_item->p_playlist,
vlc_InputItemSubItemAdded,
input_item_subitem_added,
p_item );
+ vlc_event_attach( &p_item->p_input->event_manager,
+ vlc_InputItemDurationChanged,
+ input_item_meta_changed,
+ p_item );
vlc_event_attach( &p_item->p_input->event_manager,
vlc_InputItemMetaChanged,
input_item_meta_changed,
vlc_InputItemMetaChanged,
input_item_meta_changed,
p_item );
+ vlc_event_detach( &p_item->p_input->event_manager,
+ vlc_InputItemDurationChanged,
+ input_item_meta_changed,
+ p_item );
vlc_event_detach( &p_item->p_input->event_manager,
vlc_InputItemSubItemAdded,
input_item_subitem_added,