fix: MXL_ERR_FLOW_INVALID reconnect, nullptr→"" options, null guards
Readers (ndiout, fakesink) now handle MXL_ERR_FLOW_INVALID by releasing and recreating the flow reader, then realigning the index to current time. This lets consumer nodes survive a producer restart without exiting. All mxlCreateInstance/FlowWriter/FlowReader options args changed from nullptr to "" to match MXL reference implementation style. mxlReleaseFlowReader calls guarded with null checks so cleanup is safe when a mid-run reconnect attempt fails. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,7 @@ class NDIInNode : public dmf::NodeBase {
|
||||
mxlStatus st = mxlCreateFlowWriter(
|
||||
instance(),
|
||||
dmf::make_video_flow_def(video_flow_id, node_id(), width, height, fps_num, fps_den).c_str(),
|
||||
nullptr, &video_writer, &video_cfg, &created);
|
||||
"", &video_writer, &video_cfg, &created);
|
||||
if (st != MXL_STATUS_OK) { log("video mxlCreateFlowWriter failed (%s)", dmf::mxl_status_str(st)); return; }
|
||||
|
||||
const uint32_t video_stride = video_cfg.discrete.sliceSizes[0];
|
||||
@@ -69,7 +69,7 @@ class NDIInNode : public dmf::NodeBase {
|
||||
instance(),
|
||||
dmf::make_audio_flow_def(audio_flow_id, node_id(), sample_rate, channels, bit_depth,
|
||||
fps_num, fps_den).c_str(),
|
||||
nullptr, &audio_writer, &audio_cfg, &created);
|
||||
"", &audio_writer, &audio_cfg, &created);
|
||||
if (ast != MXL_STATUS_OK) {
|
||||
log("audio mxlCreateFlowWriter failed (%s) — continuing without audio", dmf::mxl_status_str(ast));
|
||||
has_audio = false;
|
||||
|
||||
Reference in New Issue
Block a user