-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Clone to rtp.Packet #88
Comments
Hey @jech I am all for
We should for sure add a comment to |
Sean-Der
added a commit
to pion/webrtc
that referenced
this issue
Sep 17, 2020
The SampleBuilder doesn't copy. If you wish to modify the memory that was passed you should copy it first. Relates to pion/rtp#88
ffmiruz
added a commit
to ffmiruz/rtp
that referenced
this issue
Feb 3, 2021
This method performs deep copy on a packet to produce equivalent but independently mutable values. Fixes pion#88
ffmiruz
added a commit
to ffmiruz/rtp
that referenced
this issue
Feb 3, 2021
Clone performs deep copy on a packet to produce equivalent but independently mutable packets. Fixes pion#88
ffmiruz
added a commit
to ffmiruz/rtp
that referenced
this issue
Feb 3, 2021
Clone performs deep copy on a packet to produce equivalent\nbut independently mutable packets. Fixes pion#88
ffmiruz
added a commit
to ffmiruz/rtp
that referenced
this issue
Feb 3, 2021
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes pion#88
aler9
pushed a commit
to ffmiruz/rtp
that referenced
this issue
May 16, 2021
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes pion#88
Sean-Der
pushed a commit
to ffmiruz/rtp
that referenced
this issue
Aug 5, 2021
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes pion#88
Sean-Der
pushed a commit
to ffmiruz/rtp
that referenced
this issue
Aug 5, 2021
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes pion#88
Sean-Der
pushed a commit
that referenced
this issue
Aug 5, 2021
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes #88
Sean-Der
pushed a commit
that referenced
this issue
Aug 6, 2021
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes #88
aler9
pushed a commit
to aler9/rtp
that referenced
this issue
Jun 12, 2023
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes pion#88
aler9
pushed a commit
to aler9/rtp
that referenced
this issue
Jun 12, 2023
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes pion#88
aler9
pushed a commit
to aler9/rtp
that referenced
this issue
Jun 12, 2023
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes pion#88
aler9
pushed a commit
to aler9/rtp
that referenced
this issue
Jun 12, 2023
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes pion#88
aler9
pushed a commit
to aler9/rtp
that referenced
this issue
Jun 12, 2023
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes pion#88
aler9
pushed a commit
to aler9/rtp
that referenced
this issue
Jun 12, 2023
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes pion#88
aler9
pushed a commit
to aler9/rtp
that referenced
this issue
Jun 12, 2023
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes pion#88
aler9
pushed a commit
to aler9/rtp
that referenced
this issue
Jun 13, 2023
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes pion#88
Sean-Der
pushed a commit
that referenced
this issue
Jun 14, 2023
Clone performs deep copy on a packet to produce equivalent but independently mutable packet. Fixes #88
ourwarmhouse
added a commit
to ourwarmhouse/Smart-Contract---Go
that referenced
this issue
May 1, 2024
The SampleBuilder doesn't copy. If you wish to modify the memory that was passed you should copy it first. Relates to pion/rtp#88
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my SFU, packets go through a number of data structures, and finally end up in a static buffer that is passed to
Track.WriteRTP
. This works fine with ordinary tracks, but fails when trying to write data to disk:SampleBuilder.Push
requires the packet to never be overwritten. This does not appear to be documented. (My personal opinion is thatPush
should clone the packet, but as a second choice I'd be okay if the requirement that thePacket
and its underlying buffer never be reusied were clearly documented.)What is more, there is no easy way to clone a packet. I'm currently using the following code:
My suggestions are therefore:
SampleBuilder.Push
requires its parameter to never be modified;Packet.Clone()
that clones a packet efficiently;SampleBuilder.Push
copy the packet internally.The text was updated successfully, but these errors were encountered: