[0.11] gst-plugins-base: audio: Add support again for more than 64 channels with NONE layouts
Sebastian Dröge
slomo at kemper.freedesktop.org
Thu Jan 5 01:36:02 PST 2012
Module: gst-plugins-base
Branch: 0.11
Commit: 8dcea5d498240224532d39a5b52776eda45d14bd
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=8dcea5d498240224532d39a5b52776eda45d14bd
Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date: Wed Jan 4 14:35:48 2012 +0100
audio: Add support again for more than 64 channels with NONE layouts
---
gst-libs/gst/audio/audio.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/gst-libs/gst/audio/audio.c b/gst-libs/gst/audio/audio.c
index e8ba262..b7a8e23 100644
--- a/gst-libs/gst/audio/audio.c
+++ b/gst-libs/gst/audio/audio.c
@@ -404,7 +404,6 @@ check_valid_channel_positions (const GstAudioChannelPosition * position,
{
gint i, j;
guint64 channel_mask = 0;
- gboolean none_layout = FALSE;
if (channels == 1 && position[0] == GST_AUDIO_CHANNEL_POSITION_MONO) {
if (channel_mask_out)
@@ -412,6 +411,12 @@ check_valid_channel_positions (const GstAudioChannelPosition * position,
return TRUE;
}
+ if (channels > 0 && position[0] == GST_AUDIO_CHANNEL_POSITION_NONE) {
+ if (channel_mask_out)
+ *channel_mask_out = 0;
+ return TRUE;
+ }
+
j = 0;
for (i = 0; i < channels; i++) {
while (j < G_N_ELEMENTS (default_channel_order)
@@ -422,11 +427,6 @@ check_valid_channel_positions (const GstAudioChannelPosition * position,
position[i] == GST_AUDIO_CHANNEL_POSITION_MONO)
return FALSE;
- if (position[i] == GST_AUDIO_CHANNEL_POSITION_NONE) {
- none_layout = TRUE;
- continue;
- }
-
/* Is this in valid channel order? */
if (enforce_order && j == G_N_ELEMENTS (default_channel_order))
return FALSE;
@@ -438,9 +438,6 @@ check_valid_channel_positions (const GstAudioChannelPosition * position,
channel_mask |= (G_GUINT64_CONSTANT (1) << position[i]);
}
- if (none_layout && channel_mask != 0)
- return FALSE;
-
if (channel_mask_out)
*channel_mask_out = channel_mask;
More information about the gstreamer-commits
mailing list