From f38f3b88a5a74d0573dc299a512a87f6d579323b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 7 Nov 2011 11:19:17 +0200 Subject: [PATCH] tls: Use ERR_get_error() in do_tls_poll MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The return value ret isn't an error code that can be passed to ERR_error_string(). This makes the error messages printed actually contain useful information. Signed-off-by: Martin Storsjö --- libavformat/tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/tls.c b/libavformat/tls.c index 85bf46f903..bd73febd4d 100644 --- a/libavformat/tls.c +++ b/libavformat/tls.c @@ -87,7 +87,7 @@ static int do_tls_poll(URLContext *h, int ret) } else if (ret == SSL_ERROR_WANT_WRITE) { p.events = POLLOUT; } else { - av_log(NULL, AV_LOG_ERROR, "%s\n", ERR_error_string(ret, NULL)); + av_log(NULL, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), NULL)); return AVERROR(EIO); } #endif