Commit 4c18f940 authored by Olivier Dion's avatar Olivier Dion Committed by Sébastien Blin
Browse files

video_rtp_session: Fix signed integer overflow

`last_REMB_*` can be at `time_point::min()` when `delayMonitor()` is called.  This
results in a signed integer overflow, which UBASAN doesn't like.

Fix this by setting `last_REMB_*` to `clock::now()` before setting callback.

Change-Id: I0b24d759927c2eb7e23253a16333ba54dc3f9edf
parent a25b526e
......@@ -240,6 +240,9 @@ VideoRtpSession::start(std::unique_ptr<IceSocket> rtp_sock, std::unique_ptr<IceS
} else
socketPair_.reset(new SocketPair(getRemoteRtpUri().c_str(), receive_.addr.getPort()));
last_REMB_inc_ = clock::now();
last_REMB_dec_ = clock::now();
[&](int gradient, int deltaT) { delayMonitor(gradient, deltaT); });
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment