Closed
Bug 1344946
Opened 9 years ago
Closed 9 years ago
Ensure that mozRtt is initialized before use
Categories
(Core :: WebRTC, defect, P2)
Core
WebRTC
Tracking
()
RESOLVED
DUPLICATE
of bug 1344970
People
(Reporter: ng, Assigned: ng)
Details
Attachments
(1 file)
It is possible for GetRTCPReceiverReport to return with a success code without having initialized mozRtt.
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → na-g
| Comment hidden (mozreview-request) |
Comment 2•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8844231 [details]
Bug 1344946 - ensure that mozRtt is initialized;
https://reviewboard.mozilla.org/r/117752/#review119442
r=me with overflow addressed.
::: media/webrtc/signaling/src/media-conduit/VideoConduit.cpp:824
(Diff revision 1)
>
> + int64_t rtt = mRecvStream->GetRtt();
> + if (rtt < 0) { // Indicates that RTT is unavailable
> + return false;
> + }
> + MOZ_ASSERT(rtt <= UINT32_MAX);
I think we want INT32_MAX here, or we can end up returning negative numbers in the next line.
Note that MOZ_ASSERT will crash in debug builds, so are we sure the lower-level code can never ever return values bigger than this? If not, should we crop instead, and/or log a warning?
Attachment #8844231 -
Flags: review?(jib) → review+
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 5•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8844231 [details]
Bug 1344946 - ensure that mozRtt is initialized;
https://reviewboard.mozilla.org/r/117752/#review119474
::: media/webrtc/signaling/src/media-conduit/VideoConduit.cpp:820
(Diff revision 3)
> + int64_t rtt = mRecvStream->GetRtt();
> + if (rtt < 0) { // Indicates that RTT is unavailable
> + return false;
> + }
Failing to provide any stats because we can't calculate RTT is a bad idea. I just opened a spec issue on this because RoundTripTime in the spec isn't defined for the "I can't calculate it" case.
My patch for SSRCs tripped over this, and I fixed it by adding an "else { *rttMs = 0; }" in bug 1337810
Attachment #8844231 -
Flags: review-
Updated•9 years ago
|
Rank: 25
Priority: -- → P2
| Assignee | ||
Comment 6•9 years ago
|
||
Fixed in bug 1337810.
This patch is superseded by the fix in Bug 1344970.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•