# include <sys/stat.h>
#endif
+#include "../libvlc.h"
+
static const char * meta_type_to_string[VLC_META_TYPE_COUNT] =
{
[vlc_meta_Title] = N_("Title"),
assert( i_mandatory );
/* FIXME: object creation is overkill, use p_private */
- p_me = vlc_object_create( p_playlist, VLC_OBJECT_META_ENGINE );
+ p_me = vlc_custom_create( VLC_OBJECT(p_playlist), sizeof( *p_me ),
+ VLC_OBJECT_GENERIC, "meta engine" );
p_me->i_flags |= OBJECT_FLAGS_NOINTERACT;
p_me->i_flags |= OBJECT_FLAGS_QUIET;
p_me->i_mandatory = i_mandatory;
p_me->p_module = module_Need( p_me, "meta fetcher", 0, VLC_FALSE );
if( !p_me->p_module )
{
- vlc_object_destroy( p_me );
+ vlc_object_release( p_me );
return VLC_EGENERIC;
}
module_Unneed( p_me, p_me->p_module );
- vlc_object_destroy( p_me );
+ vlc_object_release( p_me );
input_item_SetMetaFetched( p_item, VLC_TRUE );
}
psz_type = strrchr( psz_arturl, '.' );
- if( strlen( psz_type ) > 5 )
+ if( psz_type && strlen( psz_type ) > 5 )
psz_type = NULL; /* remove extension if it's > to 4 characters */
/* Warning: psz_title, psz_artist, psz_album may change in ArtCache*() */
}
-uint32_t input_CurrentMetaFlags( vlc_meta_t *p_meta )
+uint32_t input_CurrentMetaFlags( const vlc_meta_t *p_meta )
{
uint32_t i_meta = 0;