From 8096984b7e7b139fec0959f4df577d0dec24b8d7 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 3 Mar 2020 13:17:28 +0100 Subject: [PATCH] testsrc: remove checks in suspend and pause We don't need to have a format or buffers to be able to pause. --- spa/plugins/audiotestsrc/audiotestsrc.c | 6 ------ spa/plugins/videotestsrc/videotestsrc.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/spa/plugins/audiotestsrc/audiotestsrc.c b/spa/plugins/audiotestsrc/audiotestsrc.c index b2d55eba4..8c9d99427 100644 --- a/spa/plugins/audiotestsrc/audiotestsrc.c +++ b/spa/plugins/audiotestsrc/audiotestsrc.c @@ -428,14 +428,8 @@ static int impl_node_send_command(void *object, const struct spa_command *comman } case SPA_NODE_COMMAND_Suspend: case SPA_NODE_COMMAND_Pause: - if (!port->have_format) - return -EIO; - if (port->n_buffers == 0) - return -EIO; - if (!this->started) return 0; - this->started = false; set_timer(this, false); break; diff --git a/spa/plugins/videotestsrc/videotestsrc.c b/spa/plugins/videotestsrc/videotestsrc.c index 5aebf8b92..758e058be 100644 --- a/spa/plugins/videotestsrc/videotestsrc.c +++ b/spa/plugins/videotestsrc/videotestsrc.c @@ -380,14 +380,8 @@ static int impl_node_send_command(void *object, const struct spa_command *comman } case SPA_NODE_COMMAND_Suspend: case SPA_NODE_COMMAND_Pause: - if (!port->have_format) - return -EIO; - if (port->n_buffers == 0) - return -EIO; - if (!this->started) return 0; - this->started = false; set_timer(this, false); break;