fix skipped write_index

This commit is contained in:
Johanness
2026-05-28 23:55:16 +03:00
parent 34f72c22f0
commit 8b5fb3dc36
+10 -6
View File
@@ -175,16 +175,20 @@ void DeckLinkInNode::process() {
{
std::lock_guard<std::mutex> lock(frame_mutex_);
if (!frame_ready_ || !frame_data_) {
return;
if (frame_data_) {
src_data = frame_data_;
src_row_bytes = frame_row_bytes_;
src_width = frame_width_;
src_height = frame_height_;
}
src_data = frame_data_;
src_row_bytes = frame_row_bytes_;
src_width = frame_width_;
src_height = frame_height_;
frame_ready_ = false;
}
if (!src_data) {
write_index_++;
return;
}
mxlGrainInfo out_grain{};
uint8_t* out_payload = nullptr;
auto status = mxlFlowWriterOpenGrain(*writer_, write_index_, &out_grain, &out_payload);