Skip to content

Commit

Permalink
few fixes to make it possible to reinitialize player after complete s…
Browse files Browse the repository at this point in the history
…hutdown, without restarting process
  • Loading branch information
Oleksiy-Yakovenko committed Jun 12, 2011
1 parent 888bb4b commit bded25b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions playlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ pl_free (void) {
mutex_plt = 0;
}
#endif
playlist = NULL;
}

#if DEBUG_LOCKING
Expand Down
11 changes: 11 additions & 0 deletions plugins.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down
1 change: 1 addition & 0 deletions streamer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bded25b

Please sign in to comment.