From 3dd24b0f708ae5c68607de0828480b09c8f95004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= Date: Fri, 16 Aug 2019 10:38:46 +0200 Subject: lavf/tls_gnutls: check for interrupt inside handshake loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #8080 Signed-off-by: Błażej Szczygieł (cherry picked from commit 561ba15c973120c9565a8f75a7439f3e8a10e04d) --- libavformat/tls_gnutls.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavformat/tls_gnutls.c') 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); -- cgit v1.2.1