wait fixes
This commit is contained in:
+7
-4
@@ -131,10 +131,13 @@ class PiPNode : public dmf::NodeBase {
|
|||||||
uint8_t* bg_buf = nullptr;
|
uint8_t* bg_buf = nullptr;
|
||||||
uint8_t* inset_buf = nullptr;
|
uint8_t* inset_buf = nullptr;
|
||||||
|
|
||||||
const mxlStatus bg_st = mxlFlowReaderGetGrainNonBlocking(
|
// Use blocking reads: sync group returns OK when headIndex >= expectedIndex,
|
||||||
bg_reader, index, &bg_grain, &bg_buf);
|
// but the writer may not have set validSlices yet. Blocking read handles
|
||||||
const mxlStatus in_st = mxlFlowReaderGetGrainNonBlocking(
|
// that race by waiting for validSlices == totalSlices.
|
||||||
inset_reader, index, &inset_grain, &inset_buf);
|
const mxlStatus bg_st = mxlFlowReaderGetGrain(
|
||||||
|
bg_reader, index, 40'000'000, &bg_grain, &bg_buf);
|
||||||
|
const mxlStatus in_st = mxlFlowReaderGetGrain(
|
||||||
|
inset_reader, index, 40'000'000, &inset_grain, &inset_buf);
|
||||||
|
|
||||||
if (bg_st != MXL_STATUS_OK || in_st != MXL_STATUS_OK || !bg_buf || !inset_buf) {
|
if (bg_st != MXL_STATUS_OK || in_st != MXL_STATUS_OK || !bg_buf || !inset_buf) {
|
||||||
log("grain read after sync OK: bg=%s inset=%s at index=%llu",
|
log("grain read after sync OK: bg=%s inset=%s at index=%llu",
|
||||||
|
|||||||
Reference in New Issue
Block a user