Repository: pion/webrtc
Pull request #1902 (2021-07-29 15:14:09)

Upgrade pion/rtp to v2
Also updates interceptor and srtp

codecov[bot]: # [Codecov](https://codecov.io/gh/pion/webrtc/pull/1902?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) Report
> Merging [#1902](https://codecov.io/gh/pion/webrtc/pull/1902?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) (d4ef372) into [master](https://codecov.io/gh/pion/webrtc/commit/5047c6b01014ccbfb38907b6dc08294cf9ec9ebf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) (5047c6b) will **decrease** coverage by `4.54%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pion/webrtc/pull/1902/graphs/tree.svg?width=650&height=150&src=pr&token=XOOuQo07I2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion)](https://codecov.io/gh/pion/webrtc/pull/1902?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion)

```diff
@@            Coverage Diff             @@
##           master    #1902      +/-   ##
==========================================
- Coverage   75.69%   71.14%   -4.55%     
==========================================
  Files          84       61      -23     
  Lines        6039     2277    -3762     
==========================================
- Hits         4571     1620    -2951     
+ Misses       1081      549     -532     
+ Partials      387      108     -279     
```

| Flag | Coverage Δ | |
|---|---|---|
| go | `?` | |
| wasm | `71.14% <ø> (ø)` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/pion/webrtc/pull/1902?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | Coverage Δ | |
|---|---|---|
| [pkg/media/h264writer/h264writer.go](https://codecov.io/gh/pion/webrtc/pull/1902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL21lZGlhL2gyNjR3cml0ZXIvaDI2NHdyaXRlci5nbw==) | `80.00% <ø> (ø)` | |
| [pkg/media/ivfwriter/ivfwriter.go](https://codecov.io/gh/pion/webrtc/pull/1902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL21lZGlhL2l2ZndyaXRlci9pdmZ3cml0ZXIuZ28=) | `61.97% <ø> (ø)` | |
| [pkg/media/oggwriter/oggwriter.go](https://codecov.io/gh/pion/webrtc/pull/1902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL21lZGlhL29nZ3dyaXRlci9vZ2d3cml0ZXIuZ28=) | `69.60% <ø> (ø)` | |
| [pkg/media/samplebuilder/samplebuilder.go](https://codecov.io/gh/pion/webrtc/pull/1902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL21lZGlhL3NhbXBsZWJ1aWxkZXIvc2FtcGxlYnVpbGRlci5nbw==) | `94.11% <ø> (-1.48%)` | :arrow_down: |
| [track\_local.go](https://codecov.io/gh/pion/webrtc/pull/1902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-dHJhY2tfbG9jYWwuZ28=) | `0.00% <ø> (-80.00%)` | :arrow_down: |
| [constants.go](https://codecov.io/gh/pion/webrtc/pull/1902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-Y29uc3RhbnRzLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [icecandidatepair.go](https://codecov.io/gh/pion/webrtc/pull/1902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-aWNlY2FuZGlkYXRlcGFpci5nbw==) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [rtpcodec.go](https://codecov.io/gh/pion/webrtc/pull/1902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cnRwY29kZWMuZ28=) | `15.00% <0.00%> (-75.00%)` | :arrow_down: |
| [stats.go](https://codecov.io/gh/pion/webrtc/pull/1902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-c3RhdHMuZ28=) | `0.00% <0.00%> (-67.86%)` | :arrow_down: |
| ... and [32 more](https://codecov.io/gh/pion/webrtc/pull/1902/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pion/webrtc/pull/1902?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pion/webrtc/pull/1902?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion). Last update [5047c6b...d4ef372](https://codecov.io/gh/pion/webrtc/pull/1902?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion).


Patch:
diff --git a/examples/rtp-forwarder/main.go b/examples/rtp-forwarder/main.go
index ebce7442..5c347f3d 100644
--- a/examples/rtp-forwarder/main.go
+++ b/examples/rtp-forwarder/main.go
@@ -10,7 +10,7 @@ import (
 
 	"github.com/pion/interceptor"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/pion/webrtc/v3"
 	"github.com/pion/webrtc/v3/examples/internal/signal"
 )
diff --git a/examples/swap-tracks/main.go b/examples/swap-tracks/main.go
index 90ab309d..0efd5227 100644
--- a/examples/swap-tracks/main.go
+++ b/examples/swap-tracks/main.go
@@ -10,7 +10,7 @@ import (
 	"time"
 
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/pion/webrtc/v3"
 	"github.com/pion/webrtc/v3/examples/internal/signal"
 )
diff --git a/go.mod b/go.mod
index c26f0840..d0869c73 100644
--- a/go.mod
+++ b/go.mod
@@ -8,14 +8,14 @@ require (
 	github.com/pion/datachannel v1.4.21
 	github.com/pion/dtls/v2 v2.0.9
 	github.com/pion/ice/v2 v2.1.10
-	github.com/pion/interceptor v0.0.13
+	github.com/pion/interceptor v0.0.14
 	github.com/pion/logging v0.2.2
 	github.com/pion/randutil v0.1.0
 	github.com/pion/rtcp v1.2.6
-	github.com/pion/rtp v1.6.5
+	github.com/pion/rtp/v2 v2.0.0
 	github.com/pion/sctp v1.7.12
 	github.com/pion/sdp/v3 v3.0.4
-	github.com/pion/srtp/v2 v2.0.2
+	github.com/pion/srtp/v2 v2.0.3
 	github.com/pion/transport v0.12.3
 	github.com/sclevine/agouti v3.0.0+incompatible
 	github.com/stretchr/testify v1.7.0
diff --git a/go.sum b/go.sum
index 588128df..92c034b5 100644
--- a/go.sum
+++ b/go.sum
@@ -43,8 +43,8 @@ github.com/pion/dtls/v2 v2.0.9 h1:7Ow+V++YSZQMYzggI0P9vLJz/hUFcffsfGMfT/Qy+u8=
 github.com/pion/dtls/v2 v2.0.9/go.mod h1:O0Wr7si/Zj5/EBFlDzDd6UtVxx25CE1r7XM7BQKYQho=
 github.com/pion/ice/v2 v2.1.10 h1:Jt/BfUsaP+Dr6E5rbsy+w7w1JtHyFN0w2DkgfWq7Fko=
 github.com/pion/ice/v2 v2.1.10/go.mod h1:kV4EODVD5ux2z8XncbLHIOtcXKtYXVgLVCeVqnpoeP0=
-github.com/pion/interceptor v0.0.13 h1:fnV+b0p/KEzwwr/9z2nsSqA9IQRMsM4nF5HjrNSWwBo=
-github.com/pion/interceptor v0.0.13/go.mod h1:svsW2QoLHLoGLUr4pDoSopGBEWk8FZwlfxId/OKRKzo=
+github.com/pion/interceptor v0.0.14 h1:gZqh9DMqE+UAnct37CfvAJj7KyYpKaFe9JkYOKMrHFU=
+github.com/pion/interceptor v0.0.14/go.mod h1:brot6Cq/5/C8oQM+NwftyvCNZWYtIVRucQ67+adgA7g=
 github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
 github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
 github.com/pion/mdns v0.0.5 h1:Q2oj/JB3NqfzY9xGZ1fPzZzK7sDSD8rZPOvcIQ10BCw=
@@ -53,16 +53,15 @@ github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
 github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
 github.com/pion/rtcp v1.2.6 h1:1zvwBbyd0TeEuuWftrd/4d++m+/kZSeiguxU61LFWpo=
 github.com/pion/rtcp v1.2.6/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0=
-github.com/pion/rtp v1.6.2/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
-github.com/pion/rtp v1.6.5 h1:o2cZf8OascA5HF/b0PAbTxRKvOWxTQxWYt7SlToxFGI=
-github.com/pion/rtp v1.6.5/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
+github.com/pion/rtp/v2 v2.0.0 h1:8s4xPETm04IugKZaykpJnJ8LAGDLOQpsIpRXMzgM6Ow=
+github.com/pion/rtp/v2 v2.0.0/go.mod h1:Vj+rrFbJCT3yxqE/VSwaOo9DQ2pMKGPxuE7hplGOlOs=
 github.com/pion/sctp v1.7.10/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0=
 github.com/pion/sctp v1.7.12 h1:GsatLufywVruXbZZT1CKg+Jr8ZTkwiPnmUC/oO9+uuY=
 github.com/pion/sctp v1.7.12/go.mod h1:xFe9cLMZ5Vj6eOzpyiKjT9SwGM4KpK/8Jbw5//jc+0s=
 github.com/pion/sdp/v3 v3.0.4 h1:2Kf+dgrzJflNCSw3TV5v2VLeI0s/qkzy2r5jlR0wzf8=
 github.com/pion/sdp/v3 v3.0.4/go.mod h1:bNiSknmJE0HYBprTHXKPQ3+JjacTv5uap92ueJZKsRk=
-github.com/pion/srtp/v2 v2.0.2 h1:664iGzVmaY7KYS5M0gleY0DscRo9ReDfTxQrq4UgGoU=
-github.com/pion/srtp/v2 v2.0.2/go.mod h1:VEyLv4CuxrwGY8cxM+Ng3bmVy8ckz/1t6A0q/msKOw0=
+github.com/pion/srtp/v2 v2.0.3 h1:MUnSpDGPezbthRMTcjYouIrOIIvDqFZwAmLs1agcrcE=
+github.com/pion/srtp/v2 v2.0.3/go.mod h1:2WNQl3ijuEAkDYfTpW8BXkfOey8zIYsoqemr6cYmdVw=
 github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg=
 github.com/pion/stun v0.3.5/go.mod h1:gDMim+47EeEtfWogA37n6qXZS88L5V6LqFcf+DZA2UA=
 github.com/pion/transport v0.10.1/go.mod h1:PBis1stIILMiis0PewDw91WJeLJkyIMcEk+DwKOzf4A=
diff --git a/interceptor.go b/interceptor.go
index eff94962..eee01baf 100644
--- a/interceptor.go
+++ b/interceptor.go
@@ -8,7 +8,7 @@ import (
 	"github.com/pion/interceptor"
 	"github.com/pion/interceptor/pkg/nack"
 	"github.com/pion/interceptor/pkg/report"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // RegisterDefaultInterceptors will register some useful interceptors.
diff --git a/mediaengine.go b/mediaengine.go
index 6c160358..91cda969 100644
--- a/mediaengine.go
+++ b/mediaengine.go
@@ -9,8 +9,8 @@ import (
 	"sync"
 	"time"
 
-	"github.com/pion/rtp"
-	"github.com/pion/rtp/codecs"
+	"github.com/pion/rtp/v2"
+	"github.com/pion/rtp/v2/codecs"
 	"github.com/pion/sdp/v3"
 )
 
diff --git a/pkg/media/h264writer/h264writer.go b/pkg/media/h264writer/h264writer.go
index 578af017..c8c79239 100644
--- a/pkg/media/h264writer/h264writer.go
+++ b/pkg/media/h264writer/h264writer.go
@@ -7,8 +7,8 @@ import (
 	"io"
 	"os"
 
-	"github.com/pion/rtp"
-	"github.com/pion/rtp/codecs"
+	"github.com/pion/rtp/v2"
+	"github.com/pion/rtp/v2/codecs"
 )
 
 type (
diff --git a/pkg/media/ivfwriter/ivfwriter.go b/pkg/media/ivfwriter/ivfwriter.go
index 3dcd16da..af81d3ac 100644
--- a/pkg/media/ivfwriter/ivfwriter.go
+++ b/pkg/media/ivfwriter/ivfwriter.go
@@ -7,8 +7,8 @@ import (
 	"io"
 	"os"
 
-	"github.com/pion/rtp"
-	"github.com/pion/rtp/codecs"
+	"github.com/pion/rtp/v2"
+	"github.com/pion/rtp/v2/codecs"
 )
 
 var (
diff --git a/pkg/media/media.go b/pkg/media/media.go
index 4b00edbe..00127922 100644
--- a/pkg/media/media.go
+++ b/pkg/media/media.go
@@ -4,7 +4,7 @@ package media
 import (
 	"time"
 
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // A Sample contains encoded media and timing information
diff --git a/pkg/media/oggwriter/oggwriter.go b/pkg/media/oggwriter/oggwriter.go
index e20492b7..6aead783 100644
--- a/pkg/media/oggwriter/oggwriter.go
+++ b/pkg/media/oggwriter/oggwriter.go
@@ -8,8 +8,8 @@ import (
 	"os"
 
 	"github.com/pion/randutil"
-	"github.com/pion/rtp"
-	"github.com/pion/rtp/codecs"
+	"github.com/pion/rtp/v2"
+	"github.com/pion/rtp/v2/codecs"
 )
 
 const (
diff --git a/pkg/media/samplebuilder/samplebuilder.go b/pkg/media/samplebuilder/samplebuilder.go
index 8e4ed3ab..22c85bcc 100644
--- a/pkg/media/samplebuilder/samplebuilder.go
+++ b/pkg/media/samplebuilder/samplebuilder.go
@@ -5,7 +5,7 @@ import (
 	"math"
 	"time"
 
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/pion/webrtc/v3/pkg/media"
 )
 
diff --git a/rtpsender.go b/rtpsender.go
index b6c4bd17..8f84e9a2 100644
--- a/rtpsender.go
+++ b/rtpsender.go
@@ -10,7 +10,7 @@ import (
 	"github.com/pion/interceptor"
 	"github.com/pion/randutil"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // RTPSender allows an application to control how a given Track is encoded and transmitted to a remote peer
diff --git a/rtptransceiver.go b/rtptransceiver.go
index 4d21b545..cfae3155 100644
--- a/rtptransceiver.go
+++ b/rtptransceiver.go
@@ -7,7 +7,7 @@ import (
 	"sync"
 	"sync/atomic"
 
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // RTPTransceiver represents a combination of an RTPSender and an RTPReceiver that share a common mid.
diff --git a/srtp_writer_future.go b/srtp_writer_future.go
index 4d8bafe1..d440b9ef 100644
--- a/srtp_writer_future.go
+++ b/srtp_writer_future.go
@@ -7,7 +7,7 @@ import (
 	"sync/atomic"
 	"time"
 
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/pion/srtp/v2"
 )
 
diff --git a/track_local.go b/track_local.go
index 42134afb..3fa7c035 100644
--- a/track_local.go
+++ b/track_local.go
@@ -1,6 +1,6 @@
 package webrtc
 
-import "github.com/pion/rtp"
+import "github.com/pion/rtp/v2"
 
 // TrackLocalWriter is the Writer for outbound RTP Packets
 type TrackLocalWriter interface {
diff --git a/track_local_static.go b/track_local_static.go
index 4275eb85..daaa3712 100644
--- a/track_local_static.go
+++ b/track_local_static.go
@@ -6,7 +6,7 @@ import (
 	"strings"
 	"sync"
 
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/pion/webrtc/v3/internal/util"
 	"github.com/pion/webrtc/v3/pkg/media"
 )
diff --git a/track_remote.go b/track_remote.go
index 7c4d8383..a9d260c5 100644
--- a/track_remote.go
+++ b/track_remote.go
@@ -7,7 +7,7 @@ import (
 	"time"
 
 	"github.com/pion/interceptor"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // TrackRemote represents a single inbound source of media


Test patch:
diff --git a/interceptor_test.go b/interceptor_test.go
index f7b9ce69..ea81be4f 100644
--- a/interceptor_test.go
+++ b/interceptor_test.go
@@ -11,7 +11,7 @@ import (
 
 	"github.com/pion/interceptor"
 	mock_interceptor "github.com/pion/interceptor/pkg/mock"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/pion/transport/test"
 	"github.com/pion/webrtc/v3/pkg/media"
 	"github.com/stretchr/testify/assert"
diff --git a/peerconnection_go_test.go b/peerconnection_go_test.go
index 6da636f3..a15d2696 100644
--- a/peerconnection_go_test.go
+++ b/peerconnection_go_test.go
@@ -19,7 +19,7 @@ import (
 	"time"
 
 	"github.com/pion/ice/v2"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/pion/transport/test"
 	"github.com/pion/transport/vnet"
 	"github.com/pion/webrtc/v3/internal/util"
@@ -1091,7 +1091,6 @@ func TestPeerConnection_MassiveTracks(t *testing.T) {
 				Extension:        false,
 				ExtensionProfile: 1,
 				Version:          2,
-				PayloadOffset:    20,
 				SequenceNumber:   27023,
 				Timestamp:        3653407706,
 				CSRC:             []uint32{},
diff --git a/peerconnection_media_test.go b/peerconnection_media_test.go
index 0ec4eeb0..3a225776 100644
--- a/peerconnection_media_test.go
+++ b/peerconnection_media_test.go
@@ -16,7 +16,7 @@ import (
 
 	"github.com/pion/randutil"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/pion/transport/test"
 	"github.com/pion/webrtc/v3/pkg/media"
 	"github.com/stretchr/testify/assert"
diff --git a/pkg/media/h264writer/h264writer_test.go b/pkg/media/h264writer/h264writer_test.go
index b414d763..fbade0a8 100644
--- a/pkg/media/h264writer/h264writer_test.go
+++ b/pkg/media/h264writer/h264writer_test.go
@@ -5,7 +5,7 @@ import (
 	"errors"
 	"testing"
 
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/pkg/media/ivfwriter/ivfwriter_test.go b/pkg/media/ivfwriter/ivfwriter_test.go
index e5403395..7b62cd6e 100644
--- a/pkg/media/ivfwriter/ivfwriter_test.go
+++ b/pkg/media/ivfwriter/ivfwriter_test.go
@@ -5,8 +5,8 @@ import (
 	"io"
 	"testing"
 
-	"github.com/pion/rtp"
-	"github.com/pion/rtp/codecs"
+	"github.com/pion/rtp/v2"
+	"github.com/pion/rtp/v2/codecs"
 	"github.com/stretchr/testify/assert"
 )
 
@@ -33,7 +33,6 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
 			Extension:        true,
 			ExtensionProfile: 1,
 			Version:          2,
-			PayloadOffset:    20,
 			PayloadType:      96,
 			SequenceNumber:   27023,
 			Timestamp:        3653407706,
@@ -41,7 +40,6 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
 			CSRC:             []uint32{},
 		},
 		Payload: rawValidPkt[20:],
-		Raw:     rawValidPkt,
 	}
 	assert.NoError(t, validPacket.SetExtension(0, []byte{0xFF, 0xFF, 0xFF, 0xFF}))
 
@@ -57,7 +55,6 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
 			Extension:        true,
 			ExtensionProfile: 1,
 			Version:          2,
-			PayloadOffset:    20,
 			PayloadType:      96,
 			SequenceNumber:   27023,
 			Timestamp:        3653407706,
@@ -65,7 +62,6 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
 			CSRC:             []uint32{},
 		},
 		Payload: rawMidPartPkt[20:],
-		Raw:     rawMidPartPkt,
 	}
 	assert.NoError(t, midPartPacket.SetExtension(0, []byte{0xFF, 0xFF, 0xFF, 0xFF}))
 
@@ -81,7 +77,6 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
 			Extension:        true,
 			ExtensionProfile: 1,
 			Version:          2,
-			PayloadOffset:    20,
 			PayloadType:      96,
 			SequenceNumber:   27023,
 			Timestamp:        3653407706,
@@ -89,7 +84,6 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
 			CSRC:             []uint32{},
 		},
 		Payload: rawKeyframePkt[20:],
-		Raw:     rawKeyframePkt,
 	}
 	assert.NoError(t, keyframePacket.SetExtension(0, []byte{0xFF, 0xFF, 0xFF, 0xFF}))
 
diff --git a/pkg/media/oggwriter/oggwriter_test.go b/pkg/media/oggwriter/oggwriter_test.go
index 74f75992..3c266977 100644
--- a/pkg/media/oggwriter/oggwriter_test.go
+++ b/pkg/media/oggwriter/oggwriter_test.go
@@ -5,7 +5,7 @@ import (
 	"io"
 	"testing"
 
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/stretchr/testify/assert"
 )
 
@@ -31,7 +31,6 @@ func TestOggWriter_AddPacketAndClose(t *testing.T) {
 			Extension:        true,
 			ExtensionProfile: 1,
 			Version:          2,
-			PayloadOffset:    20,
 			PayloadType:      111,
 			SequenceNumber:   27023,
 			Timestamp:        3653407706,
@@ -39,7 +38,6 @@ func TestOggWriter_AddPacketAndClose(t *testing.T) {
 			CSRC:             []uint32{},
 		},
 		Payload: rawPkt[20:],
-		Raw:     rawPkt,
 	}
 	assert.NoError(t, validPacket.SetExtension(0, []byte{0xFF, 0xFF, 0xFF, 0xFF}))
 
diff --git a/pkg/media/samplebuilder/samplebuilder_test.go b/pkg/media/samplebuilder/samplebuilder_test.go
index d274fe9b..82bc21f3 100644
--- a/pkg/media/samplebuilder/samplebuilder_test.go
+++ b/pkg/media/samplebuilder/samplebuilder_test.go
@@ -5,7 +5,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/pion/webrtc/v3/pkg/media"
 	"github.com/stretchr/testify/assert"
 )
diff --git a/track_local_static_test.go b/track_local_static_test.go
index 67cd62cb..bb010ce1 100644
--- a/track_local_static_test.go
+++ b/track_local_static_test.go
@@ -8,7 +8,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/pion/transport/test"
 	"github.com/stretchr/testify/assert"
 )