1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

RTC: Fix nack encode seqnum (#2766)

* fix nack encode seqnum

* add nack encode utest

* change Variable naming

Co-authored-by: liyalong1 <liyalong1@100tal.com>
This commit is contained in:
long 2021-12-06 12:42:39 +08:00 committed by GitHub
parent 5ccd63dec3
commit 4decc1fa6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 1 deletions

View file

@ -1348,7 +1348,10 @@ srs_error_t SrsRtcpNack::encode(SrsBuffer *buffer)
} else if( (sn - pid) > 16) {
// add new chunk
chunks.push_back(chunk);
chunk.in_use = false;
chunk.pid = sn;
chunk.blp = 0;
chunk.in_use = true;
pid = sn;
} else {
chunk.blp |= 1 << (sn-pid-1);
}