diff --git a/src/Rtsp/Rtsp.cpp b/src/Rtsp/Rtsp.cpp index 41f9aae5..6ff2208c 100644 --- a/src/Rtsp/Rtsp.cpp +++ b/src/Rtsp/Rtsp.cpp @@ -474,7 +474,7 @@ size_t RtpHeader::getPaddingSize(size_t rtp_size) const { if (!padding) { return 0; } - auto end = (uint8_t *) this + rtp_size; + auto end = (uint8_t *) this + rtp_size - 1; return *end; }