fix: skip non-FLTP audio frames in NDIReceiver

NDIlib_audio_frame_v3_t carries a FourCC. Only FLTP (float32 planar)
is handled — skip and free any other format rather than misinterpreting
compressed or integer audio bytes as floats.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
JohannesItten
2026-07-01 13:19:16 +03:00
parent 31b57f7a33
commit 4245284382
+4
View File
@@ -172,6 +172,10 @@ public:
} }
if (type == NDIlib_frame_type_audio) { if (type == NDIlib_frame_type_audio) {
if (audio_frame.FourCC != NDIlib_FourCC_audio_type_FLTP) {
NDIlib_recv_free_audio_v3(recv_, &audio_frame);
return FrameKind::None; // compressed or unknown format — skip
}
audio_info.sample_rate = audio_frame.sample_rate; audio_info.sample_rate = audio_frame.sample_rate;
audio_info.channels = audio_frame.no_channels; audio_info.channels = audio_frame.no_channels;
audio_info.samples = audio_frame.no_samples; audio_info.samples = audio_frame.no_samples;