Commit c99416fb authored by Max Kellermann's avatar Max Kellermann

test/dump_playlist: allocate ConfigData on the stack

parent 3caef29b
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
#include "song/DetachedSong.hxx" #include "song/DetachedSong.hxx"
#include "playlist/SongEnumerator.hxx" #include "playlist/SongEnumerator.hxx"
#include "input/InputStream.hxx" #include "input/InputStream.hxx"
#include "config/Global.hxx" #include "config/File.hxx"
#include "config/Migrate.hxx"
#include "config/Data.hxx"
#include "decoder/DecoderList.hxx" #include "decoder/DecoderList.hxx"
#include "input/Init.hxx" #include "input/Init.hxx"
#include "event/Thread.hxx" #include "event/Thread.hxx"
...@@ -60,16 +62,16 @@ try { ...@@ -60,16 +62,16 @@ try {
/* initialize MPD */ /* initialize MPD */
config_global_init(); ConfigData config;
ReadConfigFile(config, config_path);
ReadConfigFile(config_path); Migrate(config);
EventThread io_thread; EventThread io_thread;
io_thread.Start(); io_thread.Start();
input_stream_global_init(GetGlobalConfig(), io_thread.GetEventLoop()); input_stream_global_init(config, io_thread.GetEventLoop());
playlist_list_global_init(GetGlobalConfig()); playlist_list_global_init(config);
decoder_plugin_init_all(GetGlobalConfig()); decoder_plugin_init_all(config);
/* open the playlist */ /* open the playlist */
...@@ -122,7 +124,6 @@ try { ...@@ -122,7 +124,6 @@ try {
decoder_plugin_deinit_all(); decoder_plugin_deinit_all();
playlist_list_global_finish(); playlist_list_global_finish();
input_stream_global_finish(); input_stream_global_finish();
config_global_finish();
return EXIT_SUCCESS; return EXIT_SUCCESS;
} catch (...) { } catch (...) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment