mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-04 07:15:35 -04:00
adapter: increase max-retry to 64
When the follower doesn't produce enough data for this many attempts, bail and cause an xrun to avoid an infinite loop. The limit of 8 cause real-life problems and should be larger. It should probably depend on the expected size per cycle (node.latency) and the current quantum but we don't always have this information. See #4334
This commit is contained in:
parent
1c01c2a93f
commit
1782728eee
2 changed files with 6 additions and 4 deletions
|
|
@ -32,6 +32,7 @@ static struct spa_log_topic log_topic = SPA_LOG_TOPIC(0, "spa.audioadapter");
|
||||||
#define DEFAULT_ALIGN 16
|
#define DEFAULT_ALIGN 16
|
||||||
|
|
||||||
#define MAX_PORTS (SPA_AUDIO_MAX_CHANNELS+1)
|
#define MAX_PORTS (SPA_AUDIO_MAX_CHANNELS+1)
|
||||||
|
#define MAX_RETRY 64
|
||||||
|
|
||||||
/** \cond */
|
/** \cond */
|
||||||
|
|
||||||
|
|
@ -1360,7 +1361,7 @@ static int follower_ready(void *data, int status)
|
||||||
this->driver = true;
|
this->driver = true;
|
||||||
|
|
||||||
if (this->direction == SPA_DIRECTION_OUTPUT) {
|
if (this->direction == SPA_DIRECTION_OUTPUT) {
|
||||||
int retry = 8;
|
int retry = MAX_RETRY;
|
||||||
while (retry--) {
|
while (retry--) {
|
||||||
status = spa_node_process_fast(this->convert);
|
status = spa_node_process_fast(this->convert);
|
||||||
if (status & SPA_STATUS_HAVE_DATA)
|
if (status & SPA_STATUS_HAVE_DATA)
|
||||||
|
|
@ -1588,7 +1589,7 @@ impl_node_port_reuse_buffer(void *object, uint32_t port_id, uint32_t buffer_id)
|
||||||
static int impl_node_process(void *object)
|
static int impl_node_process(void *object)
|
||||||
{
|
{
|
||||||
struct impl *this = object;
|
struct impl *this = object;
|
||||||
int status = 0, fstatus, retry = 8;
|
int status = 0, fstatus, retry = MAX_RETRY;
|
||||||
|
|
||||||
if (!this->ready) {
|
if (!this->ready) {
|
||||||
if (!this->warned)
|
if (!this->warned)
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ static struct spa_log_topic log_topic = SPA_LOG_TOPIC(0, "spa.videoadapter");
|
||||||
#define DEFAULT_ALIGN 16
|
#define DEFAULT_ALIGN 16
|
||||||
|
|
||||||
#define MAX_PORTS 1
|
#define MAX_PORTS 1
|
||||||
|
#define MAX_RETRY 64
|
||||||
|
|
||||||
/** \cond */
|
/** \cond */
|
||||||
|
|
||||||
|
|
@ -1128,7 +1129,7 @@ static int follower_ready(void *data, int status)
|
||||||
this->driver = true;
|
this->driver = true;
|
||||||
|
|
||||||
if (this->direction == SPA_DIRECTION_OUTPUT) {
|
if (this->direction == SPA_DIRECTION_OUTPUT) {
|
||||||
int retry = 8;
|
int retry = MAX_RETRY;
|
||||||
while (retry--) {
|
while (retry--) {
|
||||||
status = spa_node_process(this->convert);
|
status = spa_node_process(this->convert);
|
||||||
if (status & SPA_STATUS_HAVE_DATA)
|
if (status & SPA_STATUS_HAVE_DATA)
|
||||||
|
|
@ -1367,7 +1368,7 @@ impl_node_port_reuse_buffer(void *object, uint32_t port_id, uint32_t buffer_id)
|
||||||
static int impl_node_process(void *object)
|
static int impl_node_process(void *object)
|
||||||
{
|
{
|
||||||
struct impl *this = object;
|
struct impl *this = object;
|
||||||
int status = 0, fstatus, retry = 8;
|
int status = 0, fstatus, retry = MAX_RETRY;
|
||||||
|
|
||||||
spa_log_trace_fp(this->log, "%p: process convert:%p driver:%d",
|
spa_log_trace_fp(this->log, "%p: process convert:%p driver:%d",
|
||||||
this, this->convert, this->driver);
|
this, this->convert, this->driver);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue