mirror of
https://github.com/wangyu-/UDPspeeder.git
synced 2025-01-18 22:09:35 +08:00
fixed a possible MTU issue when redundant num=0
This commit is contained in:
parent
a1d5a3805a
commit
9336246f00
@ -282,7 +282,10 @@ int fec_encode_manager_t::input(char *s,int len/*,int &is_first_packet*/)
|
||||
int best_data_num=fec_data_num;
|
||||
for(int i=1;i<actual_data_num;i++)
|
||||
{
|
||||
u32_t new_len=(blob_encode.get_shard_len(i,0)+header_overhead)*(i+fec_redundant_num);
|
||||
u32_t shard_len=blob_encode.get_shard_len(i,0);
|
||||
if(shard_len>(u32_t)fec_mtu) continue;
|
||||
|
||||
u32_t new_len=(shard_len+header_overhead)*(i+fec_redundant_num);
|
||||
if(new_len<best_len)
|
||||
{
|
||||
best_len=new_len;
|
||||
|
Loading…
x
Reference in New Issue
Block a user