Remove Head field from ExtPacket structure. (#662)
* Remove `Head` field from `ExtPacket` structure. Although we do not intend to, but if packets get out-of-order in the forwarding path (maybe reading in multiple goroutines or using some worker pool to distribute packets), the `Head` indicator could lead to wrong behaviour. It is possible that at the receiver, the order is - Seq Num N, Head = true - N + 1, Head = true If the forwarding path sees `N + 1` first, the Head flag when it sees `N` packet is incorrect and will lead to incorrect behaviour. The alternative check is very simple. So, remove `Head` flag. * Remove unused field
This commit is contained in:
@@ -321,7 +321,6 @@ func TestGapInSequenceNumberSamePicture(t *testing.T) {
|
||||
v := newVP8Munger()
|
||||
|
||||
params := &testutils.TestExtPacketParams{
|
||||
IsHead: true,
|
||||
SequenceNumber: 65533,
|
||||
Timestamp: 0xabcdef,
|
||||
SSRC: 0x12345678,
|
||||
@@ -397,7 +396,6 @@ func TestUpdateAndGetPadding(t *testing.T) {
|
||||
v := newVP8Munger()
|
||||
|
||||
params := &testutils.TestExtPacketParams{
|
||||
IsHead: true,
|
||||
SequenceNumber: 23333,
|
||||
Timestamp: 0xabcdef,
|
||||
SSRC: 0x12345678,
|
||||
|
||||
Reference in New Issue
Block a user