Revision edbdcdd8

View differences:

ice.c
3537 3537
					rtcp_rr *rr = (rtcp_rr *)rtcpbuf;
3538 3538
					rr->header.version = 2;
3539 3539
					rr->header.type = RTCP_RR;
3540
					rr->header.rc = 1;
3540
					rr->header.rc = 0;
3541 3541
					rr->header.length = htons((rrlen/4)-1);
3542 3542
					janus_ice_stream *stream = janus_flags_is_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_BUNDLE) ? (handle->audio_stream ? handle->audio_stream : handle->video_stream) : (handle->video_stream);
3543
					if(stream && stream->video_rtcp_ctx && stream->video_rtcp_ctx->rtp_recvd)
3543
					if(stream && stream->video_rtcp_ctx && stream->video_rtcp_ctx->rtp_recvd) {
3544
						rr->header.rc = 1;
3544 3545
						janus_rtcp_report_block(stream->video_rtcp_ctx, &rr->rb[0]);
3546
					}
3545 3547
					/* Append REMB */
3546 3548
					memcpy(rtcpbuf+rrlen, pkt->data, pkt->length);
3547 3549
					/* Free old packet and update */
rtcp.c
539 539
	ctx->expected_prior = ctx->expected;
540 540
	ctx->received_prior = ctx->received;
541 541
	rb->flcnpl = htonl(lost | fraction);
542
	rb->lsr = htonl(ctx->lsr);
543
	rb->delay = htonl(((now - ctx->lsr_ts) << 16) / 1000000);
542
	if(ctx->lsr > 0) {
543
		rb->lsr = htonl(ctx->lsr);
544
		rb->delay = htonl(((now - ctx->lsr_ts) / 1000000) << 16);
545
	} else {
546
		rb->lsr = 0;
547
		rb->delay = 0;
548
	}
544 549
	ctx->last_sent = now;
545 550
	return 0;
546 551
}

Also available in: Unified diff