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:
parent
7d1be87124
commit
a4dbf3ca8a
2 changed files with 9 additions and 3 deletions
|
@ -43,6 +43,7 @@ obj = json.loads(s)
|
||||||
|
|
||||||
# 2, 3, 5, 9, 16, 32, 64, 128, 256
|
# 2, 3, 5, 9, 16, 32, 64, 128, 256
|
||||||
keys = ['lt_2', 'lt_3', 'lt_5', 'lt_9', 'lt_16', 'lt_32', 'lt_64', 'lt_128', 'lt_256', 'gt_256']
|
keys = ['lt_2', 'lt_3', 'lt_5', 'lt_9', 'lt_16', 'lt_32', 'lt_64', 'lt_128', 'lt_256', 'gt_256']
|
||||||
|
print("\n----------- 1 2 [3,4] [5,8] [9,15] [16,31] [32,63] [64,127] [128,255] [256,+)"),
|
||||||
|
|
||||||
print ""
|
print ""
|
||||||
print("AV---Frames"),
|
print("AV---Frames"),
|
||||||
|
|
|
@ -485,14 +485,19 @@ SrsRtcPackets::~SrsRtcPackets()
|
||||||
|
|
||||||
void SrsRtcPackets::reset(bool gso, bool merge_nalus)
|
void SrsRtcPackets::reset(bool gso, bool merge_nalus)
|
||||||
{
|
{
|
||||||
use_gso = gso;
|
|
||||||
should_merge_nalus = merge_nalus;
|
|
||||||
|
|
||||||
for (int i = 0; i < cursor; i++) {
|
for (int i = 0; i < cursor; i++) {
|
||||||
SrsRtpPacket2* packet = packets[i];
|
SrsRtpPacket2* packet = packets[i];
|
||||||
packet->reset();
|
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;
|
cursor = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue