fix decklink-out: init grains_read from current time to avoid epoch realignment

This commit is contained in:
Johanness
2026-05-30 23:13:24 +03:00
parent c2e823beda
commit b5d9c7cd3f
2 changed files with 8 additions and 0 deletions
@@ -226,6 +226,13 @@ void DeckLinkOutNode::process() {
return;
}
if (first_frame_) {
auto now = mxlGetTime();
grains_read_ = mxlTimestampToIndex(&output_rate_, now);
first_frame_ = false;
spdlog::info("DeckLink-out: starting at output index {}", grains_read_);
}
auto deadline = mxlIndexToTimestamp(&output_rate_, grains_read_ + 1);
mxlSleepUntil(deadline);