Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorLieven Paulissen <lieven.paulissen@theoplayer.com>2023-10-11 11:12:19 +0300
committerSebastian Dröge <sebastian@centricular.com>2023-10-12 09:12:02 +0300
commit05aa9fa4313fcc525be200933400f812a686d79d (patch)
treea497dd258dd148ba00532de85ad652f2045c1718 /net
parent022afa637568c80ebf42f7c8b14fd6cff15d4250 (diff)
ndisrc: Assume input with more than 8 raw audio channels is unpositioned
gst_audio_channel_positions_from_mask() will otherwise print warnings all the time. Fixes #444 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1357>
Diffstat (limited to 'net')
-rw-r--r--net/ndi/src/ndisrc/receiver.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ndi/src/ndisrc/receiver.rs b/net/ndi/src/ndisrc/receiver.rs
index 527f55d84..2fb94e2f6 100644
--- a/net/ndi/src/ndisrc/receiver.rs
+++ b/net/ndi/src/ndisrc/receiver.rs
@@ -1662,10 +1662,12 @@ impl Receiver {
if [NDIlib_FourCC_audio_type_FLTp].contains(&fourcc) {
let channels = audio_frame.no_channels() as u32;
let mut positions = [gst_audio::AudioChannelPosition::None; 64];
- let _ = gst_audio::AudioChannelPosition::positions_from_mask(
- gst_audio::AudioChannelPosition::fallback_mask(channels),
- &mut positions[..channels as usize],
- );
+ if channels <= 8 {
+ let _ = gst_audio::AudioChannelPosition::positions_from_mask(
+ gst_audio::AudioChannelPosition::fallback_mask(channels),
+ &mut positions[..channels as usize],
+ );
+ }
let builder = gst_audio::AudioInfo::builder(
gst_audio::AUDIO_FORMAT_F32,