summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-01-10 16:40:12 +0200
committerMartin Storsjö <martin@martin.st>2013-01-12 19:48:41 +0200
commitabae27ed3acd0a7c54f11760c5be2d2653c4edf8 (patch)
treee789f9932c1058433f3a588ed5dcf97f09c661fc /libavformat/rtpdec.c
parent0f94c0b1b68a751a9e35293e723677338ecd1e90 (diff)
rtpdec: Fix the calculation of expected number of packets
The base_seq variable is set to first_seq - 1 (in rtp_init_sequence), so no + 1 is needed here. This avoids reporting 1 lost packet from the start. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec.c')
-rw-r--r--libavformat/rtpdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 9cc53e2591..20c11c73cf 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -273,7 +273,7 @@ int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, URLContext *fd,
// some placeholders we should really fill...
// RFC 1889/p64
extended_max = stats->cycles + stats->max_seq;
- expected = extended_max - stats->base_seq + 1;
+ expected = extended_max - stats->base_seq;
lost = expected - stats->received;
lost = FFMIN(lost, 0xffffff); // clamp it since it's only 24 bits...
expected_interval = expected - stats->expected_prior;