aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-18 11:54:14 +0200
committerMax Kellermann <max@duempel.org>2011-09-18 12:07:06 +0200
commitffa9f4b47f0c5505511938c51f73387bf7e9566c (patch)
tree8d72191f9275a56cc0c84c59ab5ee610ab94bce8 /src/output
parent667e22bbc79c9967cf96ef543a3d5d6dadfa7947 (diff)
downloadmpd-ffa9f4b47f0c5505511938c51f73387bf7e9566c.tar.gz
mpd-ffa9f4b47f0c5505511938c51f73387bf7e9566c.tar.xz
mpd-ffa9f4b47f0c5505511938c51f73387bf7e9566c.zip
output/roar: check return values
Fixes gcc warnings.
Diffstat (limited to 'src/output')
-rw-r--r--src/output/roar_output_plugin.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/output/roar_output_plugin.c b/src/output/roar_output_plugin.c
index 2af771f72..c6f3e99f5 100644
--- a/src/output/roar_output_plugin.c
+++ b/src/output/roar_output_plugin.c
@@ -63,7 +63,9 @@ roar_output_get_volume_locked(struct roar *roar)
float l, r;
int error;
- roar_vs_volume_get(roar->vss, &l, &r, &error);
+ if (roar_vs_volume_get(roar->vss, &l, &r, &error) < 0)
+ return -1;
+
return (l + r) * 50;
}
@@ -231,7 +233,13 @@ roar_cancel_locked(struct roar *self)
if (vss == NULL)
return;
- roar_vs_stream(vss, &(self->info), ROAR_DIR_PLAY, &(self->err));
+ if (roar_vs_stream(vss, &(self->info), ROAR_DIR_PLAY,
+ &(self->err)) < 0) {
+ roar_vs_close(vss, ROAR_VS_TRUE, &(self->err));
+ g_warning("Failed to start stream");
+ return;
+ }
+
roar_vs_role(vss, self->role, &(self->err));
self->vss = vss;
self->alive = true;