summaryrefslogtreecommitdiff
path: root/gst/interleave
diff options
context:
space:
mode:
authorVineeth TM <vineeth.tm@samsung.com>2015-06-04 14:18:01 +0900
committerThiago Santos <thiagoss@osg.samsung.com>2015-06-05 08:48:25 -0300
commit0e5631c5c002c1ae8ad9db06fb8b6806ba5b625c (patch)
tree5dd9a021235d3b263c7e2a88b88a9472f338a7cb /gst/interleave
parent8f5bdf96900c1afbfb09605f71343fde8391dbe3 (diff)
downloadgstreamer-plugins-good-0e5631c5c002c1ae8ad9db06fb8b6806ba5b625c.tar.gz
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
Diffstat (limited to 'gst/interleave')
-rw-r--r--gst/interleave/interleave.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gst/interleave/interleave.c b/gst/interleave/interleave.c
index 28f941a96..f27591a9d 100644
--- a/gst/interleave/interleave.c
+++ b/gst/interleave/interleave.c
@@ -453,7 +453,6 @@ gst_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);
@@ -497,23 +496,23 @@ gst_interleave_request_new_pad (GstElement * element, GstPadTemplate * templ,
GstInterleave *self = GST_INTERLEAVE (element);
GstPad *new_pad;
gchar *pad_name;
- gint channels, padnumber;
+ gint channel, padnumber;
GValue val = { 0, };
if (templ->direction != GST_PAD_SINK)
goto not_sink_pad;
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);
new_pad = GST_PAD_CAST (g_object_new (GST_TYPE_INTERLEAVE_PAD,
"name", pad_name, "direction", templ->direction,
"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);
g_free (pad_name);