diff --git a/validate/gst/validate/gst-validate-element-monitor.c b/validate/gst/validate/gst-validate-element-monitor.c index 220f42da78..2d5c696ac0 100644 --- a/validate/gst/validate/gst-validate-element-monitor.c +++ b/validate/gst/validate/gst-validate-element-monitor.c @@ -132,6 +132,7 @@ gst_validate_element_monitor_inspect (GstValidateElementMonitor * monitor) gst_element_class_get_metadata (klass, GST_ELEMENT_METADATA_KLASS); monitor->is_decoder = strstr (klassname, "Decoder") != NULL; monitor->is_encoder = strstr (klassname, "Encoder") != NULL; + monitor->is_demuxer = strstr (klassname, "Demuxer") != NULL; } static gboolean diff --git a/validate/gst/validate/gst-validate-element-monitor.h b/validate/gst/validate/gst-validate-element-monitor.h index 014d618da4..d113e224dc 100644 --- a/validate/gst/validate/gst-validate-element-monitor.h +++ b/validate/gst/validate/gst-validate-element-monitor.h @@ -41,6 +41,7 @@ G_BEGIN_DECLS #define GST_VALIDATE_ELEMENT_MONITOR_GET_ELEMENT(m) (GST_ELEMENT_CAST (GST_VALIDATE_MONITOR_GET_OBJECT (m))) #define GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_DECODER(m) (GST_VALIDATE_ELEMENT_MONITOR_CAST (m)->is_decoder) #define GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_ENCODER(m) (GST_VALIDATE_ELEMENT_MONITOR_CAST (m)->is_encoder) +#define GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_DEMUXER(m) (GST_VALIDATE_ELEMENT_MONITOR_CAST (m)->is_demuxer) typedef struct _GstValidateElementMonitor GstValidateElementMonitor; typedef struct _GstValidateElementMonitorClass GstValidateElementMonitorClass; @@ -61,6 +62,7 @@ struct _GstValidateElementMonitor { gboolean is_decoder; gboolean is_encoder; + gboolean is_demuxer; }; /** diff --git a/validate/gst/validate/gst-validate-pad-monitor.c b/validate/gst/validate/gst-validate-pad-monitor.c index 8a0a2d7483..931919bbcf 100644 --- a/validate/gst/validate/gst-validate-pad-monitor.c +++ b/validate/gst/validate/gst-validate-pad-monitor.c @@ -833,10 +833,21 @@ gst_validate_pad_monitor_check_aggregated_return (GstValidatePadMonitor * /* no peer pad found, nothing to do */ return; } - if (monitor->is_eos && ret == GST_FLOW_EOS) { - /* this is acceptable */ - return; + if (aggregated == GST_FLOW_OK || aggregated == GST_FLOW_EOS) { + /* those are acceptable situations */ + + if (monitor->is_eos && ret == GST_FLOW_EOS) { + /* this element received eos and returned eos */ + return; + } + + if (GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_DEMUXER (monitor) + && ret == GST_FLOW_EOS) { + /* a demuxer can return EOS when the samples end */ + return; + } } + if (aggregated != ret) { GST_VALIDATE_REPORT (monitor, WRONG_FLOW_RETURN, "Wrong combined flow return %s(%d). Expected: %s(%d)",