aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;