summaryrefslogtreecommitdiff
path: root/plugins.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-26 21:34:58 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-26 21:34:58 +0100
commitadebdd278b8e21e7ffeb107af0b3e25534edc796 (patch)
tree826f24088df473dcc5bbe62647f59817c40aa270 /plugins.c
parent3ed2d21eddf76ebe1bf05d8624ff50598a1c8d28 (diff)
parent7262368b6897b41188f0cf6844ca875027d425a4 (diff)
Merge branch 'master' into devel
Conflicts: plugins/alsa/alsa.c streamer.c
Diffstat (limited to 'plugins.c')
-rw-r--r--plugins.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins.c b/plugins.c
index 230248e7..81aaf3d0 100644
--- a/plugins.c
+++ b/plugins.c
@@ -755,10 +755,17 @@ plug_reinit_sound (void) {
fprintf (stderr, "failed to select output plugin %s\nreverted to %s\n", outplugname, prev->plugin.name);
output_plugin = prev;
}
- p_init ();
+ streamer_reset (1);
+ if (p_init () < 0) {
+ streamer_set_nextsong (-2, 0);
+ return;
+ }
if (state != OUTPUT_STATE_PAUSED && state != OUTPUT_STATE_STOPPED) {
- p_play ();
+ if (p_play () < 0) {
+ fprintf (stderr, "failed to reinit sound output\n");
+ streamer_set_nextsong (-2, 0);
+ }
}
}