mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
audiointerleave: Always have "channels" be the actual pad count
Don't force it anywhere https://bugzilla.gnome.org/show_bug.cgi?id=750252
This commit is contained in:
parent
45ef27aa46
commit
db5b3b5c41
1 changed files with 5 additions and 7 deletions
|
@ -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 = g_value_dup_boxed (value);
|
||||||
self->channel_positions_from_input = FALSE;
|
self->channel_positions_from_input = FALSE;
|
||||||
self->channels = self->channel_positions->n_values;
|
|
||||||
break;
|
break;
|
||||||
case PROP_CHANNEL_POSITIONS_FROM_INPUT:
|
case PROP_CHANNEL_POSITIONS_FROM_INPUT:
|
||||||
self->channel_positions_from_input = g_value_get_boolean (value);
|
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);
|
GstAudioInterleave *self = GST_AUDIO_INTERLEAVE (element);
|
||||||
GstAudioInterleavePad *newpad;
|
GstAudioInterleavePad *newpad;
|
||||||
gchar *pad_name;
|
gchar *pad_name;
|
||||||
gint channels, padnumber;
|
gint channel, padnumber;
|
||||||
GValue val = { 0, };
|
GValue val = { 0, };
|
||||||
|
|
||||||
/* FIXME: We ignore req_name, this is evil! */
|
/* FIXME: We ignore req_name, this is evil! */
|
||||||
|
|
||||||
padnumber = g_atomic_int_add (&self->padcounter, 1);
|
padnumber = g_atomic_int_add (&self->padcounter, 1);
|
||||||
if (self->channel_positions_from_input)
|
channel = g_atomic_int_add (&self->channels, 1);
|
||||||
channels = g_atomic_int_add (&self->channels, 1);
|
if (!self->channel_positions_from_input)
|
||||||
else
|
channel = padnumber;
|
||||||
channels = padnumber;
|
|
||||||
|
|
||||||
pad_name = g_strdup_printf ("sink_%u", padnumber);
|
pad_name = g_strdup_printf ("sink_%u", padnumber);
|
||||||
newpad = (GstAudioInterleavePad *)
|
newpad = (GstAudioInterleavePad *)
|
||||||
|
@ -746,7 +744,7 @@ gst_audio_interleave_request_new_pad (GstElement * element,
|
||||||
if (newpad == NULL)
|
if (newpad == NULL)
|
||||||
goto could_not_create;
|
goto could_not_create;
|
||||||
|
|
||||||
newpad->channel = channels;
|
newpad->channel = channel;
|
||||||
gst_pad_use_fixed_caps (GST_PAD (newpad));
|
gst_pad_use_fixed_caps (GST_PAD (newpad));
|
||||||
|
|
||||||
gst_child_proxy_child_added (GST_CHILD_PROXY (element), G_OBJECT (newpad),
|
gst_child_proxy_child_added (GST_CHILD_PROXY (element), G_OBJECT (newpad),
|
||||||
|
|
Loading…
Reference in a new issue