Commit f56465d960 for ffmpeg

commit f56465d960b018041b7b6fe0ecae7c5a0d347ddf
Author: Michael Niedermayer <michael@niedermayer.cc>
Date:   Fri Oct 2 19:50:47 2026 +0200

    avformat/rtpenc_rfc4175: Check that a pixel group fits in a packet

    Fixes: out of array access
    Fixes: infinite loop
    Fixes: JY8gU5Uv0e8b
    Found during triage of the security report fKcw8qCE1cYW
    Replicated through UnModified FFmpeg

diff --git a/libavformat/rtpenc_rfc4175.c b/libavformat/rtpenc_rfc4175.c
index 2120274f01..e7c8b2c02b 100644
--- a/libavformat/rtpenc_rfc4175.c
+++ b/libavformat/rtpenc_rfc4175.c
@@ -61,6 +61,11 @@ void ff_rtp_send_raw_rfc4175(AVFormatContext *s1, const uint8_t *buf, int size,
             return;
     }

+    if (s->max_payload_size < 2 + 6 + pgroup) {
+        av_log(s1, AV_LOG_ERROR, "Max payload size %d too low\n", s->max_payload_size);
+        return;
+    }
+
     while (i < height) {
         int left = s->max_payload_size;
         uint8_t *dest = s->buf;