From 9c94cc0590762d4cca0e7b11509c9da94cb3a200 Mon Sep 17 00:00:00 2001 From: wangzixiang Date: Thu, 25 Nov 2021 23:25:01 +0800 Subject: [PATCH] Replace <= with == since mtu cannot be negative MTU was changed to an unsigned integer --- AUTHORS.txt | 1 + codecs/g711_packet.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index 52d7bd9..809e85c 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -31,4 +31,5 @@ Sean DuBois Sean DuBois Simone Gotti Tarrence van As +wangzixiang Woodrow Douglass diff --git a/codecs/g711_packet.go b/codecs/g711_packet.go index 2348a79..7ab68b2 100644 --- a/codecs/g711_packet.go +++ b/codecs/g711_packet.go @@ -6,7 +6,7 @@ type G711Payloader struct{} // Payload fragments an G711 packet across one or more byte arrays func (p *G711Payloader) Payload(mtu uint16, payload []byte) [][]byte { var out [][]byte - if payload == nil || mtu <= 0 { + if payload == nil || mtu == 0 { return out }