Index: webrtc/modules/rtp_rtcp/source/rtcp_sender.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc |
index d15de162d9607f06cabcaa4e31372dc1e4b68ce0..684bd9ac362d1d3e12eda7fa2f2c4dbad71a0bb7 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc |
@@ -583,22 +583,16 @@ RTCPSender::BuildResult RTCPSender::BuildRR(RtcpContext* ctx) { |
RTCPSender::BuildResult RTCPSender::BuildExtendedJitterReport( |
RtcpContext* ctx) { |
- // sanity |
- if (ctx->position + 8 >= IP_PACKET_SIZE) |
- return BuildResult::kTruncated; |
+ rtcp::Ij ij; |
+ ij.WithJitterItem(ctx->jitter_transmission_offset); |
- // add picture loss indicator |
- uint8_t RC = 1; |
- *ctx->AllocateData(1) = 0x80 + RC; |
- *ctx->AllocateData(1) = 195; |
- |
- // Used fixed length of 2 |
- *ctx->AllocateData(1) = 0; |
- *ctx->AllocateData(1) = 1; |
+ PacketBuiltCallback callback(ctx); |
+ if (!ij.BuildExternalBuffer(&ctx->buffer[ctx->position], |
+ ctx->buffer_size - ctx->position, |
+ &callback)) { |
+ return BuildResult::kTruncated; |
+ } |
- // Add inter-arrival jitter |
- ByteWriter<uint32_t>::WriteBigEndian(ctx->AllocateData(4), |
- ctx->jitter_transmission_offset); |
åsapersson
2015/06/25 15:14:25
Not related to this cl but it seems like ctx->jitt
sprang_webrtc
2015/07/08 08:57:59
Indeed it seems so. This has evidently been the ca
stefan-webrtc
2015/07/08 09:09:39
I don't think it makes much sense to keep the tran
sprang_webrtc
2015/07/23 13:50:40
Acknowledged.
|
return BuildResult::kSuccess; |
} |