mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-09 13:21:16 +00:00
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
1 changed files with 12 additions and 11 deletions
|
@ -1472,8 +1472,8 @@ gst_validate_pad_monitor_event_probe (GstPad * pad, GstEvent * event,
|
||||||
|| GST_EVENT_TYPE (event) == GST_EVENT_TYPE (next_event->event)) {
|
|| GST_EVENT_TYPE (event) == GST_EVENT_TYPE (next_event->event)) {
|
||||||
g_ptr_array_remove_index (monitor->serialized_events, 0);
|
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++) {
|
for (i = 0; i < monitor->serialized_events->len; i++) {
|
||||||
SerializedEventData *stored_event =
|
SerializedEventData *stored_event =
|
||||||
g_ptr_array_index (monitor->serialized_events, i);
|
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,
|
/* This so far is just like an event that is flowing downstream,
|
||||||
* so we do the same checks as a sinkpad event handler */
|
* so we do the same checks as a sinkpad event handler */
|
||||||
|
|
Loading…
Reference in a new issue