Revision edbdcdd8 rtcp.c

View differences:

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