gboolean done;
GstPad *otherpad;
GstPad *peerpad;
+ GstState state, pending;
GstValidatePadMonitor *othermonitor;
GstFlowReturn aggregated = GST_FLOW_NOT_LINKED;
gboolean found_a_pad = FALSE;
/* no peer pad found, nothing to do */
goto done;
}
- if (aggregated == GST_FLOW_OK || aggregated == GST_FLOW_EOS) {
- GstState state, pending;
+
+ if (aggregated == GST_FLOW_FLUSHING) {
+ gst_element_get_state (GST_ELEMENT (parent), &state, &pending, 0);
+ if (state < GST_STATE_PAUSED || pending < GST_STATE_PAUSED) {
+ /* Aggregated is flushing, we might have been aggregating a combination
+ * of pads that are not what was present on the element during the actual
+ * data flow combination (pads might have been removed meanwhile) */
+
+ goto done;
+ }
+ } else if (aggregated == GST_FLOW_OK || aggregated == GST_FLOW_EOS) {
/* those are acceptable situations */
if (GST_PAD_IS_FLUSHING (pad) && ret == GST_FLOW_FLUSHING) {
FLOW_TEST (ok_ok_error_ok, OK, OK, ERROR, OK, TRUE);
FLOW_TEST (eos_eos_eos_ok, EOS, EOS, EOS, OK, TRUE);
-FLOW_TEST (flushing_ok_ok_ok, FLUSHING, OK, OK, OK, TRUE);
FLOW_TEST (not_neg_ok_ok_ok, NOT_NEGOTIATED, OK, OK, OK, TRUE);
/*[> Passing cases: <]*/
+FLOW_TEST (flushing_ok_ok_ok, FLUSHING, OK, OK, OK, FALSE);
FLOW_TEST (eos_eos_eos_eos, EOS, EOS, EOS, EOS, FALSE);
FLOW_TEST (eos_eos_ok_ok, EOS, EOS, OK, OK, FALSE);
FLOW_TEST (ok_ok_ok_eos, OK, OK, OK, EOS, FALSE);