This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 546d565d07c4b6ef51c26c4c7a4b8868c357204c
Author:     Jack Lau <[email protected]>
AuthorDate: Mon Feb 9 16:57:27 2026 +0800
Commit:     Jack Lau <[email protected]>
CommitDate: Tue Feb 17 13:27:09 2026 +0000

    avformat/tls_gnutls: limit the written size to data MTU
    
    Signed-off-by: Jack Lau <[email protected]>
---
 libavformat/tls_gnutls.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c
index d0358c162c..957831081e 100644
--- a/libavformat/tls_gnutls.c
+++ b/libavformat/tls_gnutls.c
@@ -709,6 +709,12 @@ static int tls_write(URLContext *h, const uint8_t *buf, 
int size)
     // Set or clear the AVIO_FLAG_NONBLOCK on c->tls_shared.tcp
     uc->flags &= ~AVIO_FLAG_NONBLOCK;
     uc->flags |= h->flags & AVIO_FLAG_NONBLOCK;
+
+    if (s->is_dtls) {
+        const size_t mtu_size = gnutls_dtls_get_data_mtu(c->session);
+        size = FFMIN(size, mtu_size);
+    }
+
     ret = gnutls_record_send(c->session, buf, size);
     if (ret > 0)
         return ret;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to