diff --git a/validate/gst/validate/gst-validate-pad-monitor.c b/validate/gst/validate/gst-validate-pad-monitor.c index a81f104bfd..a42634b9b5 100644 --- a/validate/gst/validate/gst-validate-pad-monitor.c +++ b/validate/gst/validate/gst-validate-pad-monitor.c @@ -1616,6 +1616,11 @@ gst_validate_pad_monitor_common_event_check (GstValidatePadMonitor * { guint32 seqnum = gst_event_get_seqnum (event); + if (seqnum == GST_SEQNUM_INVALID) + GST_VALIDATE_REPORT (pad_monitor, EVENT_INVALID_SEQNUM, + "Event %p (%s) has an invalid SEQNUM", event, + GST_EVENT_TYPE_NAME (event)); + switch (GST_EVENT_TYPE (event)) { case GST_EVENT_FLUSH_START: { diff --git a/validate/gst/validate/gst-validate-report.c b/validate/gst/validate/gst-validate-report.c index e773f75b50..e67d5c522f 100644 --- a/validate/gst/validate/gst-validate-report.c +++ b/validate/gst/validate/gst-validate-report.c @@ -342,6 +342,10 @@ gst_validate_report_load_issues (void) " EOS being some kind of data flow, there is no exception" " in that regard")); + REGISTER_VALIDATE_ISSUE (CRITICAL, EVENT_INVALID_SEQNUM, + _("Event has an invalid seqnum"), + _("An event is using GST_SEQNUM_INVALID. This should never happen")); + REGISTER_VALIDATE_ISSUE (CRITICAL, STATE_CHANGE_FAILURE, _("state change failed"), NULL); diff --git a/validate/gst/validate/gst-validate-report.h b/validate/gst/validate/gst-validate-report.h index c701f3a5b3..09db59893e 100644 --- a/validate/gst/validate/gst-validate-report.h +++ b/validate/gst/validate/gst-validate-report.h @@ -92,6 +92,7 @@ typedef enum { #define EVENT_SEEK_NOT_HANDLED _QUARK("event::seek-not-handled") #define EVENT_SEEK_RESULT_POSITION_WRONG _QUARK("event::seek-result-position-wrong") #define EVENT_EOS_WITHOUT_SEGMENT _QUARK("event::eos-without-segment") +#define EVENT_INVALID_SEQNUM _QUARK("event::invalid-seqnum") #define STATE_CHANGE_FAILURE _QUARK("state::change-failure")