return VLC_SUCCESS;
}
+void vlclua_dir_list_free( char **ppsz_dir_list )
+{
+ char **ppsz_dir;
+ for( ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
+ free( *ppsz_dir );
+}
+
/*****************************************************************************
* Will execute func on all scripts in luadirname, and stop if func returns
* success.
char *psz_filename;
if( asprintf( &psz_filename,
"%s" DIR_SEP "%s", *ppsz_dir, *ppsz_file ) < 0)
+ {
+ vlclua_dir_list_free( ppsz_dir_list );
return VLC_ENOMEM;
+ }
msg_Dbg( p_this, "Trying Lua playlist script %s", psz_filename );
i_ret = func( p_this, psz_filename, L, user_data );
free( *ppsz_file );
free( ppsz_filelist );
}
- for( ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
- free( *ppsz_dir );
+ vlclua_dir_list_free( ppsz_dir_list );
return i_ret;
}
msg_Dbg( p_this, "Custom meta %s, %s: %s",
psz_meta_category, psz_meta_name,
psz_meta_value );
- input_ItemAddInfo( p_input, psz_meta_category,
+ input_item_AddInfo( p_input, psz_meta_category,
psz_meta_name, psz_meta_value );
}
lua_pop( L, 1 ); /* pop item */
vlclua_read_options( p_this, L, &i_options, &ppsz_options );
/* Create input item */
- p_input = input_ItemNewExt( p_playlist, psz_path,
+ p_input = input_item_NewExt( p_playlist, psz_path,
psz_name, i_options,
(const char **)ppsz_options,
i_duration );
/* Append item to playlist */
if( p_parent ) /* Add to node */
- input_ItemAddSubItem( p_parent, p_input );
+ input_item_AddSubItem( p_parent, p_input );
else /* Play or Enqueue (preparse) */
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input,