mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 05:21:00 +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/1357>
This commit is contained in:
parent
022afa6375
commit
05aa9fa431
1 changed files with 6 additions and 4 deletions
|
@ -1662,10 +1662,12 @@ impl Receiver {
|
||||||
if [NDIlib_FourCC_audio_type_FLTp].contains(&fourcc) {
|
if [NDIlib_FourCC_audio_type_FLTp].contains(&fourcc) {
|
||||||
let channels = audio_frame.no_channels() as u32;
|
let channels = audio_frame.no_channels() as u32;
|
||||||
let mut positions = [gst_audio::AudioChannelPosition::None; 64];
|
let mut positions = [gst_audio::AudioChannelPosition::None; 64];
|
||||||
let _ = gst_audio::AudioChannelPosition::positions_from_mask(
|
if channels <= 8 {
|
||||||
gst_audio::AudioChannelPosition::fallback_mask(channels),
|
let _ = gst_audio::AudioChannelPosition::positions_from_mask(
|
||||||
&mut positions[..channels as usize],
|
gst_audio::AudioChannelPosition::fallback_mask(channels),
|
||||||
);
|
&mut positions[..channels as usize],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
let builder = gst_audio::AudioInfo::builder(
|
let builder = gst_audio::AudioInfo::builder(
|
||||||
gst_audio::AUDIO_FORMAT_F32,
|
gst_audio::AUDIO_FORMAT_F32,
|
||||||
|
|
Loading…
Reference in a new issue