diff --git a/validate/gst/validate/gst-validate-pad-monitor.c b/validate/gst/validate/gst-validate-pad-monitor.c index f4884b5082..e8394940ed 100644 --- a/validate/gst/validate/gst-validate-pad-monitor.c +++ b/validate/gst/validate/gst-validate-pad-monitor.c @@ -1198,7 +1198,7 @@ _combine_flows (GstFlowReturn ret1, GstFlowReturn ret2) static void gst_validate_pad_monitor_check_aggregated_return (GstValidatePadMonitor * - monitor, GstFlowReturn ret) + monitor, GstObject * parent, GstFlowReturn ret) { GstIterator *iter; gboolean done; @@ -1250,13 +1250,22 @@ gst_validate_pad_monitor_check_aggregated_return (GstValidatePadMonitor * return; } if (aggregated == GST_FLOW_OK || aggregated == GST_FLOW_EOS) { - /* those are acceptable situations */ + GstState state, pending; + /* those are acceptable situations */ if (GST_PAD_IS_FLUSHING (pad) && ret == GST_FLOW_FLUSHING) { /* pad is flushing, always acceptable to return flushing */ return; } + gst_element_get_state (GST_ELEMENT (parent), &state, &pending, 0); + if (ret == GST_FLOW_FLUSHING && (state < GST_STATE_PAUSED + || pending < GST_STATE_PAUSED)) { + /* Element is being teared down, accept FLOW_FLUSHING */ + + return; + } + if (monitor->is_eos && ret == GST_FLOW_EOS) { /* this element received eos and returned eos */ return; @@ -2071,7 +2080,7 @@ gst_validate_pad_monitor_chain_func (GstPad * pad, GstObject * parent, mark_pads_eos (pad_monitor); } if (PAD_PARENT_IS_DEMUXER (pad_monitor)) - gst_validate_pad_monitor_check_aggregated_return (pad_monitor, ret); + gst_validate_pad_monitor_check_aggregated_return (pad_monitor, parent, ret); GST_VALIDATE_MONITOR_UNLOCK (pad_monitor); GST_VALIDATE_PAD_MONITOR_PARENT_UNLOCK (pad_monitor); diff --git a/validate/gst/validate/gst-validate-pipeline-monitor.c b/validate/gst/validate/gst-validate-pipeline-monitor.c index bf61bd3b37..b52282c9e5 100644 --- a/validate/gst/validate/gst-validate-pipeline-monitor.c +++ b/validate/gst/validate/gst-validate-pipeline-monitor.c @@ -158,7 +158,7 @@ _bus_handler (GstBus * bus, GstMessage * message, if (percent == 100) { /* a 100% message means buffering is done */ - gst_validate_printf (NULL, "Done buffering\n"); + gst_validate_printf (NULL, "\nDone buffering\n"); if (monitor->buffering) { monitor->print_pos_srcid = g_timeout_add (PRINT_POSITION_TIMEOUT, @@ -169,7 +169,7 @@ _bus_handler (GstBus * bus, GstMessage * message, /* buffering... */ if (!monitor->buffering) { monitor->buffering = TRUE; - gst_validate_printf (NULL, "Start buffering\n"); + gst_validate_printf (NULL, "\nStart buffering\n"); if (monitor->print_pos_srcid && g_source_remove (monitor->print_pos_srcid)) { monitor->print_pos_srcid = 0;