Match libav's RTMP receive window rollover behaviour

This commit is contained in:
Thulinma 2022-09-19 17:26:15 +02:00
parent f3c003481d
commit 3e85da2afd
2 changed files with 6 additions and 1 deletions

View file

@ -475,6 +475,11 @@ bool RTMPStream::Chunk::Parse(Socket::Buffer &buffer){
}
lastrecv[cs_id] = *this;
RTMPStream::rec_cnt += i + real_len;
if (RTMPStream::rec_cnt >= 0xf0000000){
INFO_MSG("Resetting receive window due to impending rollover");
RTMPStream::rec_cnt -= 0xf0000000;
RTMPStream::rec_window_at = 0;
}
if (len_left == 0){
return true;
}else{