pad-monitor: improve serialized event checks
If the event was already found at the first position of the array, it shouldn't be searched on the rest of it. This removes lots of false positives.
This commit is contained in:
parent
1a54b40c78
commit
a06a9038a4
@ -1472,8 +1472,8 @@ gst_validate_pad_monitor_event_probe (GstPad * pad, GstEvent * event,
|
||||
|| GST_EVENT_TYPE (event) == GST_EVENT_TYPE (next_event->event)) {
|
||||
g_ptr_array_remove_index (monitor->serialized_events, 0);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
/* if the event is not the first, it might be out of order */
|
||||
for (i = 0; i < monitor->serialized_events->len; i++) {
|
||||
SerializedEventData *stored_event =
|
||||
g_ptr_array_index (monitor->serialized_events, i);
|
||||
@ -1487,6 +1487,7 @@ gst_validate_pad_monitor_event_probe (GstPad * pad, GstEvent * event,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* This so far is just like an event that is flowing downstream,
|
||||
* so we do the same checks as a sinkpad event handler */
|
||||
|
Loading…
x
Reference in New Issue
Block a user