fix skipped write_index
This commit is contained in:
@@ -175,16 +175,20 @@ void DeckLinkInNode::process() {
|
|||||||
|
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock(frame_mutex_);
|
std::lock_guard<std::mutex> lock(frame_mutex_);
|
||||||
if (!frame_ready_ || !frame_data_) {
|
if (frame_data_) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
src_data = frame_data_;
|
src_data = frame_data_;
|
||||||
src_row_bytes = frame_row_bytes_;
|
src_row_bytes = frame_row_bytes_;
|
||||||
src_width = frame_width_;
|
src_width = frame_width_;
|
||||||
src_height = frame_height_;
|
src_height = frame_height_;
|
||||||
|
}
|
||||||
frame_ready_ = false;
|
frame_ready_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!src_data) {
|
||||||
|
write_index_++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mxlGrainInfo out_grain{};
|
mxlGrainInfo out_grain{};
|
||||||
uint8_t* out_payload = nullptr;
|
uint8_t* out_payload = nullptr;
|
||||||
auto status = mxlFlowWriterOpenGrain(*writer_, write_index_, &out_grain, &out_payload);
|
auto status = mxlFlowWriterOpenGrain(*writer_, write_index_, &out_grain, &out_payload);
|
||||||
|
|||||||
Reference in New Issue
Block a user