We have inconsistent behavior: some methods in RtpPacket keep existing payload padding after mangling the payload others don't.
Those methods that keep existing payload do it wrong (real bug here) since they do NOT write the number of padding bytes in the last byte of the padding.
After this PR:
All methods (but clone()) remove payload padding if present. Period.
There is no real need to keep padding (AKA be padded to 4 bytes). That's just for super legazy plain RTP engines.
"And why don't we keep existing padding instead?". See section above "Before this PR". Lot of work for little/null benefit. I don't want to waste much energy on this topic given that (when time comes in) I'd like to focus on task https://github.com/versatica/mediasoup/issues/1233 instead.
Fixes #1379
Details
Before this PR:
RtpPacket
keep existing payload padding after mangling the payload others don't.After this PR:
clone()
) remove payload padding if present. Period.