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

Rtc2Rtmp: Using rtp timestamp to distinguish different video frame (#2721)

This commit is contained in:
john 2021-11-09 07:35:00 +08:00 committed by GitHub
parent 1f4dad024e
commit 878833bb95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 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);
};