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:
@@ -172,6 +172,10 @@ public:
|
||||
}
|
||||
|
||||
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.channels = audio_frame.no_channels;
|
||||
audio_info.samples = audio_frame.no_samples;
|
||||
|
||||
Reference in New Issue
Block a user