mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-02 21:12:12 +00:00
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>
This commit is contained in:
parent
0f94c0b1b6
commit
abae27ed3a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user