Replaced afprintf usage with std::string to fix memory leak and improve portability of code.

This commit is contained in:
Robert Osfield 2010-04-28 10:15:16 +00:00
parent 7fb49c6d2f
commit dfda4ce35f

View File

@ -326,9 +326,8 @@ class ReaderWriterXine : public osgDB::ReaderWriter
const char* user_home = xine_get_homedir(); const char* user_home = xine_get_homedir();
if(user_home) if(user_home)
{ {
char* cfgfile = NULL; std::string configFile(std::string(user_home)+"/.xine/config");
int result = asprintf(&(cfgfile), "%s/.xine/config", user_home); xine_config_load(_xine, configFile.c_str());
if (result>0) xine_config_load(_xine, cfgfile);
} }
xine_init(_xine); xine_init(_xine);