rtpsource: rewrite timeout-check to avoid underflow

If current_time is < collision_timeout, we get an uint64 underflow, and
the check will trigger prematurely.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/817>
This commit is contained in:
Havard Graff 2020-11-13 12:39:53 +01:00
parent 5a2f9d510f
commit 97ced29277

View file

@ -1831,7 +1831,7 @@ timeout_conflicting_addresses (GList * conflicting_addresses,
RTPConflictingAddress *known_conflict = item->data;
GList *next_item = g_list_next (item);
if (known_conflict->time < current_time - collision_timeout) {
if (known_conflict->time + collision_timeout < current_time) {
gchar *buf;
conflicting_addresses = g_list_delete_link (conflicting_addresses, item);