fix realignment
This commit is contained in:
@@ -239,13 +239,17 @@ void DeckLinkOutNode::process() {
|
|||||||
if (status == MXL_ERR_OUT_OF_RANGE_TOO_LATE || status == MXL_ERR_OUT_OF_RANGE_TOO_EARLY) {
|
if (status == MXL_ERR_OUT_OF_RANGE_TOO_LATE || status == MXL_ERR_OUT_OF_RANGE_TOO_EARLY) {
|
||||||
auto now = mxlGetTime();
|
auto now = mxlGetTime();
|
||||||
auto current_index = mxlTimestampToIndex(&flow_rate_, now);
|
auto current_index = mxlTimestampToIndex(&flow_rate_, now);
|
||||||
read_index_ = current_index - 2;
|
spdlog::warn("DeckLink-out: realigned from {} to {}", source_index, current_index - 2);
|
||||||
if (grains_read_ == 0) {
|
source_index = current_index - 2;
|
||||||
spdlog::warn("DeckLink-out: realigned to source index {}", read_index_);
|
|
||||||
}
|
status = mxlFlowReaderGetGrain(*reader_, source_index, 5000000ULL, &grain_info, &payload);
|
||||||
}
|
if (status != MXL_STATUS_OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mxlFlowConfigInfo config{};
|
mxlFlowConfigInfo config{};
|
||||||
mxlFlowReaderGetConfigInfo(*reader_, &config);
|
mxlFlowReaderGetConfigInfo(*reader_, &config);
|
||||||
|
|||||||
Reference in New Issue
Block a user