During element shutdown, the srtp encryption session object can be cleaned up. In that case, return GST_FLOW_FLUSHING from the chain function. Also properly return GST_FLOW_ERROR upstream during actual errors. https://bugzilla.gnome.org/show_bug.cgi?id=790508