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

Fix RTP packet cache bug

This commit is contained in:
winlin 2020-04-16 08:43:54 +08:00
parent 7d1be87124
commit a4dbf3ca8a
2 changed files with 9 additions and 3 deletions

View file

@ -485,13 +485,18 @@ SrsRtcPackets::~SrsRtcPackets()
void SrsRtcPackets::reset(bool gso, bool merge_nalus)
{
use_gso = gso;
should_merge_nalus = merge_nalus;
for (int i = 0; i < cursor; i++) {
SrsRtpPacket2* packet = packets[i];
packet->reset();
}
use_gso = gso;
should_merge_nalus = merge_nalus;
nn_rtp_pkts = 0;
nn_audios = nn_extras = 0;
nn_videos = nn_samples = 0;
nn_paddings = 0;
cursor = 0;
}