diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2013-09-12 13:18:19 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@gnumonks.org> | 2013-09-12 13:19:32 +0200 |
commit | ceda50fa707a55d5ca74aee1cadf84ee9bbb028d (patch) | |
tree | 320463dcf874b75a7c8fffd932355c46d4d049d4 | |
parent | 7b37afba337c1eb64b32d99400121700e8e7a61c (diff) |
osmux: add artificial limit for cloned RTP packets
Avoid spamming lots of cloned RTP packets in case of severe
gaps.
-rw-r--r-- | src/osmux.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osmux.c b/src/osmux.c index 34f4422..5cd586c 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -347,6 +347,10 @@ static void osmux_replay_lost_packets(struct batch_list_node *node, diff = ntohs(cur_rtph->sequence) - ntohs(rtph->sequence); + /* Lifesaver: make sure bugs don't spawn lots of clones */ + if (diff > 16) + diff = 16; + /* If diff between last RTP packet seen and this one is > 1, * then we lost several RTP packets, let's replay them. */ |