summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-06-07 20:53:56 +0200
committerGravatar waker <wakeroid@gmail.com>2011-06-12 13:40:20 +0200
commitbded25b2bafd98fce08b6cdcd6276b3dcf508cbc (patch)
tree16a1981a7af2dbfdb1648fe9148c9d4d0426035e
parent888bb4bd239e695a6937bf5deaf97e72de79f1f6 (diff)
few fixes to make it possible to reinitialize player after complete shutdown, without restarting process
-rw-r--r--conf.c3
-rw-r--r--playlist.c1
-rw-r--r--plugins.c11
-rw-r--r--streamer.c1
4 files changed, 16 insertions, 0 deletions
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