I am using libsrtp for srtp encryption in a webrtc call.
After I prepare RTP packet, I call srtp_protect to encrypt it. It encrypts the data part and keeps RTP header as it is. This was working fine till now with audio only calls.
Now I am supporting VP8. As per RFC 7741 (RTP VP8 packetization), the RTP packet is like RTP header + VP8 packetization data + Payload.
So when I feed this entire buffer to srtp_protect,it is encrypting the VP8 packetization portion and Payload. My understanding is that RTP header, VP8 packetization portion should not be encrypted. Only payload should be encrypted.
Is my understanding correct?
How can I use srtp_protect incase of RTP VP8 packetization?
Any hint highly appreciated.