audio: channel-mix: Fix channel count limit to be able to equal 64

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3958>
This commit is contained in:
Yang, Xuchen 2023-02-13 11:46:03 -08:00 committed by Tim-Philipp Müller
parent 625f9aab09
commit b2bdadd05b

View file

@ -833,8 +833,8 @@ gst_audio_channel_mixer_new_with_matrix (GstAudioChannelMixerFlags flags,
|| format == GST_AUDIO_FORMAT_S32 || format == GST_AUDIO_FORMAT_S32
|| format == GST_AUDIO_FORMAT_F32 || format == GST_AUDIO_FORMAT_F32
|| format == GST_AUDIO_FORMAT_F64, NULL); || format == GST_AUDIO_FORMAT_F64, NULL);
g_return_val_if_fail (in_channels > 0 && in_channels < 64, NULL); g_return_val_if_fail (in_channels > 0 && in_channels <= 64, NULL);
g_return_val_if_fail (out_channels > 0 && out_channels < 64, NULL); g_return_val_if_fail (out_channels > 0 && out_channels <= 64, NULL);
mix = g_slice_new0 (GstAudioChannelMixer); mix = g_slice_new0 (GstAudioChannelMixer);
mix->in_channels = in_channels; mix->in_channels = in_channels;
@ -995,8 +995,8 @@ gst_audio_channel_mixer_new (GstAudioChannelMixerFlags flags,
|| format == GST_AUDIO_FORMAT_S32 || format == GST_AUDIO_FORMAT_S32
|| format == GST_AUDIO_FORMAT_F32 || format == GST_AUDIO_FORMAT_F32
|| format == GST_AUDIO_FORMAT_F64, NULL); || format == GST_AUDIO_FORMAT_F64, NULL);
g_return_val_if_fail (in_channels > 0 && in_channels < 64, NULL); g_return_val_if_fail (in_channels > 0 && in_channels <= 64, NULL);
g_return_val_if_fail (out_channels > 0 && out_channels < 64, NULL); g_return_val_if_fail (out_channels > 0 && out_channels <= 64, NULL);
matrix = matrix =
gst_audio_channel_mixer_setup_matrix (flags, in_channels, in_position, gst_audio_channel_mixer_setup_matrix (flags, in_channels, in_position,