From 529f443a617a0ef78d8a55e0ee511dca9b092ad4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 2 Mar 2010 13:21:24 +0100 Subject: [PATCH] rtpsource: use payload size to estimate bitrate Use the length of the payload for estimating the receiver bitrate so that it matches the calculations done on the sender side. Together with the number of packets one can scale the bitrate with the header overhead of the lower transport. --- gst/rtpmanager/rtpsource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c index 5d08945e35..0b014b68f1 100644 --- a/gst/rtpmanager/rtpsource.c +++ b/gst/rtpmanager/rtpsource.c @@ -1015,7 +1015,7 @@ rtp_source_process_rtp (RTPSource * src, GstBuffer * buffer, src->stats.bytes_received += arrival->bytes; src->stats.packets_received++; /* for the bitrate estimation */ - src->bytes_received += arrival->bytes; + src->bytes_received += arrival->payload_len; /* the source that sent the packet must be a sender */ src->is_sender = TRUE; src->validated = TRUE;