summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2017-04-10 11:43:28 +0200
committerEdward Hervey <bilboed@bilboed.com>2017-04-10 11:43:28 +0200
commit1f5a900bced7a4e69ab6c9c7e39f976cef7247b7 (patch)
tree41150daf4861b1152aba78c7d689b40bce7d2d99
parentb156616b5c424ee2c5d2f9aa6d233106f3fe97a4 (diff)
validate-pad-monitor: Fix previous commit
Post-send handling was only meant for seek events
-rw-r--r--validate/gst/validate/gst-validate-pad-monitor.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/validate/gst/validate/gst-validate-pad-monitor.c b/validate/gst/validate/gst-validate-pad-monitor.c
index 86f6990..13f2498 100644
--- a/validate/gst/validate/gst-validate-pad-monitor.c
+++ b/validate/gst/validate/gst-validate-pad-monitor.c
@@ -1964,20 +1964,22 @@ gst_validate_pad_monitor_src_event_check (GstValidatePadMonitor * pad_monitor,
gst_event_ref (event);
ret = pad_monitor->event_func (pad, parent, event);
- /* If the seek was already handled (same current seqnum), reset the
- * expected accurate seek value */
- if (ret && pad_monitor->has_segment
- && seqnum == pad_monitor->pending_eos_seqnum) {
- GST_DEBUG_OBJECT (pad_monitor->pad,
- "Resetting expected accurate seek value, was already handled");
- pad_monitor->pending_seek_accurate_time = GST_CLOCK_TIME_NONE;
- } else if (!ret) {
- /* do not expect any of these events anymore */
- pad_monitor->pending_flush_start_seqnum = 0;
- pad_monitor->pending_flush_stop_seqnum = 0;
- pad_monitor->pending_newsegment_seqnum = 0;
- pad_monitor->pending_eos_seqnum = 0;
- pad_monitor->pending_seek_accurate_time = GST_CLOCK_TIME_NONE;
+ if (GST_EVENT_TYPE (event) == GST_EVENT_SEEK) {
+ /* If the seek was already handled (same current seqnum), reset the
+ * expected accurate seek value */
+ if (ret && pad_monitor->has_segment
+ && seqnum == pad_monitor->pending_eos_seqnum) {
+ GST_DEBUG_OBJECT (pad_monitor->pad,
+ "Resetting expected accurate seek value, was already handled");
+ pad_monitor->pending_seek_accurate_time = GST_CLOCK_TIME_NONE;
+ } else if (!ret) {
+ /* do not expect any of these events anymore */
+ pad_monitor->pending_flush_start_seqnum = 0;
+ pad_monitor->pending_flush_stop_seqnum = 0;
+ pad_monitor->pending_newsegment_seqnum = 0;
+ pad_monitor->pending_eos_seqnum = 0;
+ pad_monitor->pending_seek_accurate_time = GST_CLOCK_TIME_NONE;
+ }
}
GST_VALIDATE_MONITOR_LOCK (pad_monitor);
}