[FFmpeg-cvslog] lavf/tls_gnutls: check for interrupt inside handshake loop

Błażej Szczygieł git at videolan.org
Fri Sep 4 22:29:36 EEST 2020


ffmpeg | branch: release/4.0 | Błażej Szczygieł <spaz16 at wp.pl> | Fri Aug 16 10:38:46 2019 +0200| [f07dc7cc1c9c93d98514fb4c8cfe5d47e7a151d1] | committer: Jan Ekström

lavf/tls_gnutls: check for interrupt inside handshake loop

fixes #8080

Signed-off-by: Błażej Szczygieł <spaz16 at wp.pl>
(cherry picked from commit 561ba15c973120c9565a8f75a7439f3e8a10e04d)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f07dc7cc1c9c93d98514fb4c8cfe5d47e7a151d1
---

 libavformat/tls_gnutls.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c
index f32bc2821b..e41156cc30 100644
--- a/libavformat/tls_gnutls.c
+++ b/libavformat/tls_gnutls.c
@@ -183,6 +183,11 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
     gnutls_transport_set_ptr(p->session, c->tcp);
     gnutls_priority_set_direct(p->session, "NORMAL", NULL);
     do {
+        if (ff_check_interrupt(&h->interrupt_callback)) {
+            ret = AVERROR_EXIT;
+            goto fail;
+        }
+
         ret = gnutls_handshake(p->session);
         if (gnutls_error_is_fatal(ret)) {
             ret = print_tls_error(h, ret);



More information about the ffmpeg-cvslog mailing list