summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-07-10 14:30:31 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-07-10 14:30:31 +0200
commitc8cfaff1ff03c2c1f6670280cc311fdf118a2a20 (patch)
treea587ee8bb479fae9e67fbbdbf00ac8f092312904 /plugins
parent05bbd1b11af52491106cff97df3ef703e55c7536 (diff)
inputselector: Keep previous active sinkpad around until we're done with it
Otherwise we'll send a new segment event downstream for each buffer.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/elements/gstinputselector.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c
index 9caf5f1c9..6fcda9347 100644
--- a/plugins/elements/gstinputselector.c
+++ b/plugins/elements/gstinputselector.c
@@ -504,6 +504,7 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
gst_event_set_seqnum (event, selpad->segment_seqnum);
}
}
+
GST_DEBUG_OBJECT (pad, "configured SEGMENT %" GST_SEGMENT_FORMAT,
&selpad->segment);
break;
@@ -1037,9 +1038,6 @@ gst_selector_pad_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
g_object_notify (G_OBJECT (active_sinkpad), "active");
g_object_notify (G_OBJECT (sel), "active-pad");
}
- if (prev_active_sinkpad)
- gst_object_unref (prev_active_sinkpad);
- prev_active_sinkpad = NULL;
/* if we have a pending events, push them now */
if (G_UNLIKELY (prev_active_sinkpad != active_sinkpad
@@ -1049,6 +1047,10 @@ gst_selector_pad_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
selpad->events_pending = FALSE;
}
+ if (prev_active_sinkpad)
+ gst_object_unref (prev_active_sinkpad);
+ prev_active_sinkpad = NULL;
+
if (selpad->discont) {
buf = gst_buffer_make_writable (buf);