aboutsummaryrefslogtreecommitdiff
path: root/libavformat/tls.c
diff options
context:
space:
mode:
authorMichael Niedermayer2013-09-23 12:01:49 +0200
committerMichael Niedermayer2013-09-23 12:01:53 +0200
commit03e9506aae31d012ab822722c43b40b8d4a191a8 (patch)
tree7332aee3869871326e41dac7f17a778896f0a5a4 /libavformat/tls.c
parent09e06cd90fa2208446851d921f1104bbb957b883 (diff)
parent5055035670bd1a1eaca64bd3bc71fb07de9df2c3 (diff)
Merge commit '5055035670bd1a1eaca64bd3bc71fb07de9df2c3'
* commit '5055035670bd1a1eaca64bd3bc71fb07de9df2c3': tls: Do not abort on non-fatal TLS alerts with gnutls Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/tls.c')
-rw-r--r--libavformat/tls.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavformat/tls.c b/libavformat/tls.c
index b7434c67dc..4bf70a9ff6 100644
--- a/libavformat/tls.c
+++ b/libavformat/tls.c
@@ -73,7 +73,14 @@ static int do_tls_poll(URLContext *h, int ret)
TLSContext *c = h->priv_data;
struct pollfd p = { c->fd, 0, 0 };
#if CONFIG_GNUTLS
- if (ret != GNUTLS_E_AGAIN && ret != GNUTLS_E_INTERRUPTED) {
+ switch (ret) {
+ case GNUTLS_E_AGAIN:
+ case GNUTLS_E_INTERRUPTED:
+ break;
+ case GNUTLS_E_WARNING_ALERT_RECEIVED:
+ av_log(h, AV_LOG_WARNING, "%s\n", gnutls_strerror(ret));
+ break;
+ default:
av_log(h, AV_LOG_ERROR, "%s\n", gnutls_strerror(ret));
return AVERROR(EIO);
}