summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2015-06-01 19:43:20 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2015-06-01 19:43:20 -0400
commitdb5b3b5c4124f340f9bf784a6db7141868febce2 (patch)
tree6147de891e80db8dbfc50d40f964cd18660d91a7 /gst
parent45ef27aa4630afc91fee625310862e2c5cdc879d (diff)
downloadgstreamer-plugins-bad-db5b3b5c4124f340f9bf784a6db7141868febce2.tar.gz
audiointerleave: Always have "channels" be the actual pad count
Don't force it anywhere https://bugzilla.gnome.org/show_bug.cgi?id=750252
Diffstat (limited to 'gst')
-rw-r--r--gst/audiomixer/gstaudiointerleave.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gst/audiomixer/gstaudiointerleave.c b/gst/audiomixer/gstaudiointerleave.c
index 5b55f301f..01ce19cca 100644
--- a/gst/audiomixer/gstaudiointerleave.c
+++ b/gst/audiomixer/gstaudiointerleave.c
@@ -669,7 +669,6 @@ gst_audio_interleave_set_property (GObject * object, guint prop_id,
self->channel_positions = g_value_dup_boxed (value);
self->channel_positions_from_input = FALSE;
- self->channels = self->channel_positions->n_values;
break;
case PROP_CHANNEL_POSITIONS_FROM_INPUT:
self->channel_positions_from_input = g_value_get_boolean (value);
@@ -727,16 +726,15 @@ gst_audio_interleave_request_new_pad (GstElement * element,
GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (element);
GstAudioInterleavePad *newpad;
gchar *pad_name;
- gint channels, padnumber;
+ gint channel, padnumber;
GValue val = { 0, };
/* FIXME: We ignore req_name, this is evil! */
padnumber = g_atomic_int_add (&self->padcounter, 1);
- if (self->channel_positions_from_input)
- channels = g_atomic_int_add (&self->channels, 1);
- else
- channels = padnumber;
+ channel = g_atomic_int_add (&self->channels, 1);
+ if (!self->channel_positions_from_input)
+ channel = padnumber;
pad_name = g_strdup_printf ("sink_%u", padnumber);
newpad = (GstAudioInterleavePad *)
@@ -746,7 +744,7 @@ gst_audio_interleave_request_new_pad (GstElement * element,
if (newpad == NULL)
goto could_not_create;
- newpad->channel = channels;
+ newpad->channel = channel;
gst_pad_use_fixed_caps (GST_PAD (newpad));
gst_child_proxy_child_added (GST_CHILD_PROXY (element), G_OBJECT (newpad),