fix: set p216_frame FourCC; scope audio_rate to has_audio branch
ndiout: p216_frame.FourCC was zero-initialized — NDI needs it explicitly
set to NDIlib_FourCC_video_type_P216 to send the correct format.
All three nodes: audio_rate = {sample_rate, 1} was always declared even
when has_audio is false (sample_rate = 0 in ndiout). Scoped into the
has_audio block so the bad rate can never be passed to mxlGetCurrentIndex.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -81,10 +81,13 @@ class NDIInNode : public dmf::NodeBase {
|
||||
|
||||
// --- main loop ---
|
||||
const mxlRational video_rate = {fps_num, fps_den};
|
||||
const mxlRational audio_rate = {sample_rate, 1};
|
||||
|
||||
uint64_t video_index = mxlGetCurrentIndex(&video_rate);
|
||||
uint64_t audio_index = has_audio ? mxlGetCurrentIndex(&audio_rate) : 0;
|
||||
uint64_t audio_index = 0;
|
||||
if (has_audio) {
|
||||
const mxlRational audio_rate = {sample_rate, 1};
|
||||
audio_index = mxlGetCurrentIndex(&audio_rate);
|
||||
}
|
||||
log("start video_index=%llu", video_index);
|
||||
|
||||
std::vector<uint8_t> latest_video(video_stride * height);
|
||||
|
||||
Reference in New Issue
Block a user