mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-15 23:01:02 +00:00
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/1387>
This commit is contained in:
parent
ac3ca76c9f
commit
beb524e950
1 changed files with 6 additions and 4 deletions
|
@ -1615,10 +1615,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,
|
||||
|
|
Loading…
Reference in a new issue