mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
splitter: we always produce output
Always set the HAVE_OUTPUT flag because we always consume the input and produce output, either to a buffer or an error. This makes sure processing never stalls when something is wrong on the output side. See #1305
This commit is contained in:
parent
16755cef52
commit
4aa80c7a71
1 changed files with 2 additions and 4 deletions
|
|
@ -1009,10 +1009,8 @@ static int impl_node_process(void *object)
|
||||||
spa_log_trace_fp(this->log, NAME " %p: %d %p %d %d %d", this, i,
|
spa_log_trace_fp(this->log, NAME " %p: %d %p %d %d %d", this, i,
|
||||||
outio, outio->status, outio->buffer_id, outport->stride);
|
outio, outio->status, outio->buffer_id, outport->stride);
|
||||||
|
|
||||||
if (SPA_UNLIKELY(outio->status == SPA_STATUS_HAVE_DATA)) {
|
if (SPA_UNLIKELY(outio->status == SPA_STATUS_HAVE_DATA))
|
||||||
res |= SPA_STATUS_HAVE_DATA;
|
|
||||||
goto empty;
|
goto empty;
|
||||||
}
|
|
||||||
|
|
||||||
if (SPA_LIKELY(outio->buffer_id < outport->n_buffers)) {
|
if (SPA_LIKELY(outio->buffer_id < outport->n_buffers)) {
|
||||||
queue_buffer(this, outport, outio->buffer_id);
|
queue_buffer(this, outport, outio->buffer_id);
|
||||||
|
|
@ -1042,7 +1040,6 @@ static int impl_node_process(void *object)
|
||||||
|
|
||||||
outio->status = SPA_STATUS_HAVE_DATA;
|
outio->status = SPA_STATUS_HAVE_DATA;
|
||||||
outio->buffer_id = dbuf->id;
|
outio->buffer_id = dbuf->id;
|
||||||
res |= SPA_STATUS_HAVE_DATA;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spa_log_trace_fp(this->log, NAME " %p: n_src:%d n_dst:%d n_samples:%d max:%d stride:%d p:%d", this,
|
spa_log_trace_fp(this->log, NAME " %p: n_src:%d n_dst:%d n_samples:%d max:%d stride:%d p:%d", this,
|
||||||
|
|
@ -1054,6 +1051,7 @@ static int impl_node_process(void *object)
|
||||||
|
|
||||||
inio->status = SPA_STATUS_NEED_DATA;
|
inio->status = SPA_STATUS_NEED_DATA;
|
||||||
res |= SPA_STATUS_NEED_DATA;
|
res |= SPA_STATUS_NEED_DATA;
|
||||||
|
res |= SPA_STATUS_HAVE_DATA;
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue