libvlc_event_t event;
p_md_child = libvlc_media_descriptor_new_from_input_item(
- p_md->p_libvlc_instance,
+ p_md->p_libvlc_instance,
p_event->u.input_item_subitem_added.p_new_child, NULL );
/* Add this to our media list */
if( !p_md->p_subitems )
+ {
p_md->p_subitems = libvlc_media_list_new( p_md->p_libvlc_instance, NULL );
- if( !p_md->p_subitems )
+ libvlc_media_list_set_media_descriptor( p_md->p_subitems, p_md, NULL );
+ }
+ if( p_md->p_subitems )
{
libvlc_media_list_add_media_descriptor( p_md->p_subitems, p_md_child, NULL );
}
p_md = malloc( sizeof(libvlc_media_descriptor_t) );
p_md->p_libvlc_instance = p_instance;
p_md->p_input_item = p_input_item;
- p_md->b_preparsed = VLC_TRUE;
+ p_md->b_preparsed = VLC_FALSE;
p_md->i_refcount = 1;
/* A media descriptor can be a playlist. When you open a playlist
vlc_dictionary_init( &p_md->tags, 1 );
p_md->p_event_manager = libvlc_event_manager_new( p_md, p_instance, p_e );
- libvlc_event_manager_register_event_type( p_md->p_event_manager,
+ libvlc_event_manager_register_event_type( p_md->p_event_manager,
libvlc_MediaDescriptorMetaChanged, p_e );
- libvlc_event_manager_register_event_type( p_md->p_event_manager,
+ libvlc_event_manager_register_event_type( p_md->p_event_manager,
libvlc_MediaDescriptorSubItemAdded, p_e );
vlc_gc_incref( p_md->p_input_item );
if( !tag || !key )
return;
-
+
p_ts = vlc_dictionary_value_for_key( &p_md->tags, key );
if( !p_ts )
p_ts->ppsz_tags = malloc(sizeof(char*)*(p_ts->i_count));
else
p_ts->ppsz_tags = realloc(p_ts->ppsz_tags, sizeof(char*)*(p_ts->i_count));
-
+
p_ts->ppsz_tags[p_ts->i_count-1] = strdup( tag );
}
if( !tag || !key )
return;
-
+
p_ts = vlc_dictionary_value_for_key( &p_md->tags, key );
if( !p_ts )
if( !key )
return 0;
-
+
p_ts = vlc_dictionary_value_for_key( &p_md->tags, key );
if( !p_ts )
if( !key )
return NULL;
-
+
p_ts = vlc_dictionary_value_for_key( &p_md->tags, key );
if( !p_ts )
return NULL;
-
+
return strdup( p_ts->ppsz_tags[i] );
}