diff --git a/validate/gst/validate/gst-validate-pad-monitor.c b/validate/gst/validate/gst-validate-pad-monitor.c index a3a4344e8f..4968828950 100644 --- a/validate/gst/validate/gst-validate-pad-monitor.c +++ b/validate/gst/validate/gst-validate-pad-monitor.c @@ -1159,6 +1159,9 @@ gst_validate_pad_monitor_downstream_event_check (GstValidatePadMonitor * } } + /* got a segment, no need for EOS now */ + pad_monitor->pending_eos_seqnum = 0; + if (GST_PAD_DIRECTION (pad) == GST_PAD_SINK) { gst_validate_pad_monitor_add_expected_newsegment (pad_monitor, event); } else { @@ -1186,6 +1189,13 @@ gst_validate_pad_monitor_downstream_event_check (GstValidatePadMonitor * break; case GST_EVENT_EOS: pad_monitor->is_eos = TRUE; + if (pad_monitor->pending_eos_seqnum && + pad_monitor->pending_eos_seqnum != seqnum) { + GST_VALIDATE_REPORT (pad_monitor, EVENT_HAS_WRONG_SEQNUM, + "The expected EOS seqnum should be the same as the " + "one from the seek that caused it. Got: %u." + " Expected: %u", seqnum, pad_monitor->pending_eos_seqnum); + } /* * TODO add end of stream checks for * - events not pushed @@ -1270,6 +1280,7 @@ gst_validate_pad_monitor_src_event_check (GstValidatePadMonitor * pad_monitor, pad_monitor->pending_flush_stop_seqnum = seqnum; } pad_monitor->pending_newsegment_seqnum = seqnum; + pad_monitor->pending_eos_seqnum = seqnum; } break; /* both flushes are handled by the common event handling function */ diff --git a/validate/gst/validate/gst-validate-pad-monitor.h b/validate/gst/validate/gst-validate-pad-monitor.h index 5b11dbad41..e91e740b73 100644 --- a/validate/gst/validate/gst-validate-pad-monitor.h +++ b/validate/gst/validate/gst-validate-pad-monitor.h @@ -80,6 +80,7 @@ struct _GstValidatePadMonitor { guint32 pending_flush_stop_seqnum; guint32 pending_flush_start_seqnum; guint32 pending_newsegment_seqnum; + guint32 pending_eos_seqnum; GstEvent *expected_segment; GPtrArray *serialized_events;