Skip to content

Commit

Permalink
Fixed RTCP lost packet message fencepost error
Browse files Browse the repository at this point in the history
  • Loading branch information
steely-glint committed Jun 27, 2022
1 parent f68bf2b commit 8415197
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.phono</groupId>
<artifactId>srtplight</artifactId>
<version>1.1.8</version>
<version>1.1.9</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/phono/srtplight/RTCP.java
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,13 @@ public List<Long> getSeqList(){
ByteBuffer bb = ByteBuffer.wrap(fci);
long lost = (long) bb.getChar();
ret.add(lost);
long bits = (long) bb.getChar();
for (int i=0;i<16;i++){
int bit = BitUtils.getBit(fci, i+16);
long bit = bits & 0x1;
if (bit != 0){
ret.add(lost+i);
ret.add(lost+i+1);
}
bits = bits >> 1;
}
return ret;
}
Expand Down

0 comments on commit 8415197

Please sign in to comment.