From cb3f1b51aaa1688052853a52c5fd6b35cfdf77f6 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 7 Aug 2020 10:47:40 +0200 Subject: [PATCH] adapter: only become started on success --- spa/plugins/audioconvert/audioadapter.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spa/plugins/audioconvert/audioadapter.c b/spa/plugins/audioconvert/audioadapter.c index ad36d5f2b..2890edf15 100644 --- a/spa/plugins/audioconvert/audioadapter.c +++ b/spa/plugins/audioconvert/audioadapter.c @@ -511,7 +511,6 @@ static int impl_node_send_command(void *object, const struct spa_command *comman return res; if ((res = negotiate_buffers(this)) < 0) return res; - this->started = true; break; case SPA_NODE_COMMAND_Suspend: configure_format(this, 0, NULL); @@ -536,6 +535,11 @@ static int impl_node_send_command(void *object, const struct spa_command *comman return res; } } + switch (SPA_NODE_COMMAND_ID(command)) { + case SPA_NODE_COMMAND_Start: + this->started = true; + break; + } return res; }