GST_INPUT_SELECTOR_LOCK (sel);
+ sel->active_sinkpad_from_user = ! !pad;
#if DEBUG_CACHED_BUFFERS
gst_input_selector_debug_cached_buffers (sel);
#endif
GST_DEBUG_OBJECT (sel, "Deactivating pad %s:%s", GST_DEBUG_PAD_NAME (pad));
gst_object_unref (sel->active_sinkpad);
sel->active_sinkpad = NULL;
+ sel->active_sinkpad_from_user = FALSE;
}
sel->n_pads--;
GST_INPUT_SELECTOR_UNLOCK (sel);
GST_INPUT_SELECTOR_LOCK (sel);
/* clear active pad */
- if (sel->active_sinkpad) {
+ if (sel->active_sinkpad && !sel->active_sinkpad_from_user) {
gst_object_unref (sel->active_sinkpad);
sel->active_sinkpad = NULL;
}
GstPad *srcpad;
- GstPad *active_sinkpad;
+ gboolean active_sinkpad_from_user;
+ GstPad* active_sinkpad;
guint n_pads; /* number of pads */
guint padcount; /* sequence number for pads */
gboolean sync_streams;