From 887afecc225dd9a765537aeb4d5967daa81ae96e Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Wed, 24 Jul 2013 09:51:05 -0300 Subject: [PATCH] pad-monitor: accept unexpected flow return if pad is eos Track eos event and mark that pad as eos so that checking for the flow return knows when 'unexpected' is acceptable --- validate/gst/qa/gst-qa-pad-monitor.c | 14 +++++++++++++- validate/gst/qa/gst-qa-pad-monitor.h | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/validate/gst/qa/gst-qa-pad-monitor.c b/validate/gst/qa/gst-qa-pad-monitor.c index 1367c8a..eb667fb 100644 --- a/validate/gst/qa/gst-qa-pad-monitor.c +++ b/validate/gst/qa/gst-qa-pad-monitor.c @@ -729,6 +729,10 @@ gst_qa_pad_monitor_check_aggregated_return (GstQaPadMonitor * monitor, /* no peer pad found, nothing to do */ return; } + if (monitor->is_eos && ret == GST_FLOW_UNEXPECTED) { + /* this is acceptable */ + return; + } if (aggregated != ret) { /* TODO review this error code */ GST_QA_MONITOR_REPORT_CRITICAL (monitor, TRUE, BUFFER, UNEXPECTED, @@ -1010,11 +1014,19 @@ gst_qa_pad_monitor_sink_event_check (GstQaPadMonitor * pad_monitor, } } break; + case GST_EVENT_EOS: + pad_monitor->is_eos = TRUE; + /* + * TODO add end of stream checks for + * - events not pushed + * - buffer data not pushed + * - pending events not received + */ + break; /* both flushes are handled by the common event function */ case GST_EVENT_FLUSH_START: case GST_EVENT_FLUSH_STOP: - case GST_EVENT_EOS: case GST_EVENT_TAG: case GST_EVENT_SINK_MESSAGE: default: diff --git a/validate/gst/qa/gst-qa-pad-monitor.h b/validate/gst/qa/gst-qa-pad-monitor.h index dbf8518..18010a8 100644 --- a/validate/gst/qa/gst-qa-pad-monitor.h +++ b/validate/gst/qa/gst-qa-pad-monitor.h @@ -73,6 +73,7 @@ struct _GstQaPadMonitor { gboolean first_buffer; gboolean has_segment; + gboolean is_eos; gboolean pending_flush_stop; guint32 pending_flush_stop_seqnum; -- 2.7.4