Encrypt Video Call using Custom Method

hello, I’m using an element-android app trying to modify the existing encryption method on webrtc by adding a new method before encryption and after decryption on srtp. The method I use causes the size of the data packet to increase from the initial size. When tested, the voice call communication went smoothly, but the video call caused the video from the interlocutor not to display what should have been, including anything that could represent the interlocutor’s camera capture. However, in terms of voice when the video call goes well. During the test, the log that appears shows the following error.

W/vp8_header_parser.cc: (line 172): Failed to get QP, invalid length: 49727
W/video_receive_stream2.cc: (line 756): Failed to extract QP from VP8 video frame
W/generic_decoder.cc: (line 296): Failed to decode frame with timestamp 4036674814, error code: -1

What I’m confused about is why increasing the payload size at the time of data transmission can cause this to happen? Isn’t it when the data payload arrives at the receiver the payload size will decrypt and back to the original data and size ?