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

Squash: Merge #2721, #2729

This commit is contained in:
winlin 2021-11-13 19:36:43 +08:00
parent 6cde9a0230
commit 5f85d405e7
5 changed files with 18 additions and 8 deletions

View file

@ -300,6 +300,7 @@ private:
bool in_use;
uint16_t sn;
uint32_t ts;
uint32_t rtp_ts;
SrsRtpPacket* pkt;
};
const static uint16_t s_cache_size = 512;
@ -325,7 +326,7 @@ private:
int32_t find_next_lost_sn(uint16_t current_sn, uint16_t& end_sn);
void clear_cached_video();
inline uint16_t cache_index(uint16_t current_sn) {
return current_sn%s_cache_size;
return current_sn % s_cache_size;
}
bool check_frame_complete(const uint16_t start, const uint16_t end);
};