From bded25b2bafd98fce08b6cdcd6276b3dcf508cbc Mon Sep 17 00:00:00 2001 From: waker Date: Tue, 7 Jun 2011 20:53:56 +0200 Subject: few fixes to make it possible to reinitialize player after complete shutdown, without restarting process --- conf.c | 3 +++ playlist.c | 1 + plugins.c | 11 +++++++++++ streamer.c | 1 + 4 files changed, 16 insertions(+) diff --git a/conf.c b/conf.c index 887ad053..f875d349 100644 --- a/conf.c +++ b/conf.c @@ -52,7 +52,10 @@ conf_free (void) { next = it->next; conf_item_free (it); } + conf_items = NULL; + changed = 0; mutex_free (mutex); + mutex = 0; } int diff --git a/playlist.c b/playlist.c index f339c7d4..390cd133 100644 --- a/playlist.c +++ b/playlist.c @@ -162,6 +162,7 @@ pl_free (void) { mutex_plt = 0; } #endif + playlist = NULL; } #if DEBUG_LOCKING diff --git a/plugins.c b/plugins.c index 70c49bc9..53436f9a 100644 --- a/plugins.c +++ b/plugins.c @@ -996,6 +996,17 @@ plug_unload_all (void) { g_gui_names[i] = NULL; } plugins_tail = NULL; + + memset (g_plugins, 0, sizeof (g_plugins)); + memset (g_gui_names, 0, sizeof (g_gui_names)); + g_num_gui_names = 0; + memset (g_decoder_plugins, 0, sizeof (g_decoder_plugins)); + memset (g_vfs_plugins, 0, sizeof (g_vfs_plugins)); + memset (g_dsp_plugins, 0, sizeof (g_dsp_plugins)); + memset (g_output_plugins, 0, sizeof (g_output_plugins)); + output_plugin = NULL; + memset (g_playlist_plugins, 0, sizeof (g_playlist_plugins)); + trace ("all plugins had been unloaded\n"); } diff --git a/streamer.c b/streamer.c index 2f137891..74398e34 100644 --- a/streamer.c +++ b/streamer.c @@ -1580,6 +1580,7 @@ streamer_dsp_init (void) { int streamer_init (void) { + streaming_terminate = 0; #if WRITE_DUMP out = fopen ("out.raw", "w+b"); #endif -- cgit v1.2.3