mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +00:00
interleave: error when channel-positions-from-input=False
self->channels is being incremented only when channel-positions-from-input is set as TRUE. So in case of FALSE self->func is not set and hence creating assertion error. Hence removing the condition to increment self->channels. https://bugzilla.gnome.org/show_bug.cgi?id=744211
This commit is contained in:
parent
8f5bdf9690
commit
0e5631c5c0
1 changed files with 6 additions and 7 deletions
|
@ -453,7 +453,6 @@ gst_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);
|
||||||
|
@ -497,23 +496,23 @@ gst_interleave_request_new_pad (GstElement * element, GstPadTemplate * templ,
|
||||||
GstInterleave *self = GST_INTERLEAVE (element);
|
GstInterleave *self = GST_INTERLEAVE (element);
|
||||||
GstPad *new_pad;
|
GstPad *new_pad;
|
||||||
gchar *pad_name;
|
gchar *pad_name;
|
||||||
gint channels, padnumber;
|
gint channel, padnumber;
|
||||||
GValue val = { 0, };
|
GValue val = { 0, };
|
||||||
|
|
||||||
if (templ->direction != GST_PAD_SINK)
|
if (templ->direction != GST_PAD_SINK)
|
||||||
goto not_sink_pad;
|
goto not_sink_pad;
|
||||||
|
|
||||||
padnumber = g_atomic_int_add (&self->padcounter, 1);
|
padnumber = g_atomic_int_add (&self->padcounter, 1);
|
||||||
if (self->channel_positions_from_input)
|
|
||||||
channels = g_atomic_int_add (&self->channels, 1);
|
channel = g_atomic_int_add (&self->channels, 1);
|
||||||
else
|
if (!self->channel_positions_from_input)
|
||||||
channels = padnumber;
|
channel = padnumber;
|
||||||
|
|
||||||
pad_name = g_strdup_printf ("sink_%u", padnumber);
|
pad_name = g_strdup_printf ("sink_%u", padnumber);
|
||||||
new_pad = GST_PAD_CAST (g_object_new (GST_TYPE_INTERLEAVE_PAD,
|
new_pad = GST_PAD_CAST (g_object_new (GST_TYPE_INTERLEAVE_PAD,
|
||||||
"name", pad_name, "direction", templ->direction,
|
"name", pad_name, "direction", templ->direction,
|
||||||
"template", templ, NULL));
|
"template", templ, NULL));
|
||||||
GST_INTERLEAVE_PAD_CAST (new_pad)->channel = channels;
|
GST_INTERLEAVE_PAD_CAST (new_pad)->channel = channel;
|
||||||
GST_DEBUG_OBJECT (self, "requested new pad %s", pad_name);
|
GST_DEBUG_OBJECT (self, "requested new pad %s", pad_name);
|
||||||
g_free (pad_name);
|
g_free (pad_name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue