Return ANY caps if the parent disappeared, i.e. the template caps
and don't leak events if the parent disappeared.
GstPad *otherpad;
sel = GST_INPUT_SELECTOR (gst_pad_get_parent (pad));
- if (G_UNLIKELY (sel == NULL))
+ if (G_UNLIKELY (sel == NULL)) {
+ gst_event_unref (event);
return FALSE;
+ }
otherpad = gst_input_selector_get_linked_pad (sel, pad, TRUE);
if (otherpad) {
sel = GST_INPUT_SELECTOR (gst_pad_get_parent (pad));
if (G_UNLIKELY (sel == NULL))
- return FALSE;
+ return gst_caps_new_any ();
otherpad = gst_input_selector_get_linked_pad (sel, pad, FALSE);