[FFmpeg-cvslog] rtpdec: Fix the calculation of expected number of packets
Martin Storsjö
git at videolan.org
Sun Jan 13 13:59:48 CET 2013
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Jan 10 16:40:12 2013 +0200| [abae27ed3acd0a7c54f11760c5be2d2653c4edf8] | committer: Martin Storsjö
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 at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=abae27ed3acd0a7c54f11760c5be2d2653c4edf8
---
libavformat/rtpdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 9cc53e2..20c11c7 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;
More information about the ffmpeg-cvslog
mailing list