[FFmpeg-cvslog] tls: Use the URLContext as logging context

Martin Storsjö git at videolan.org
Fri Nov 11 02:53:08 CET 2011


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Nov 10 17:52:38 2011 +0200| [371d15ec361168d7f0d43b6f717da231c3b9e433] | committer: Martin Storsjö

tls: Use the URLContext as logging context

Signed-off-by: Martin Storsjö <martin at martin.st>

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

 libavformat/tls.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavformat/tls.c b/libavformat/tls.c
index f89a717..8211e88 100644
--- a/libavformat/tls.c
+++ b/libavformat/tls.c
@@ -73,7 +73,7 @@ static int do_tls_poll(URLContext *h, int ret)
     struct pollfd p = { c->fd, 0, 0 };
 #if CONFIG_GNUTLS
     if (ret != GNUTLS_E_AGAIN && ret != GNUTLS_E_INTERRUPTED) {
-        av_log(NULL, AV_LOG_ERROR, "%s\n", gnutls_strerror(ret));
+        av_log(h, AV_LOG_ERROR, "%s\n", gnutls_strerror(ret));
         return AVERROR(EIO);
     }
     if (gnutls_record_get_direction(c->session))
@@ -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(ERR_get_error(), NULL));
+        av_log(h, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), NULL));
         return AVERROR(EIO);
     }
 #endif
@@ -148,13 +148,13 @@ static int tls_open(URLContext *h, const char *uri, int flags)
 #elif CONFIG_OPENSSL
     c->ctx = SSL_CTX_new(SSLv3_client_method());
     if (!c->ctx) {
-        av_log(NULL, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), NULL));
+        av_log(h, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), NULL));
         ret = AVERROR(EIO);
         goto fail;
     }
     c->ssl = SSL_new(c->ctx);
     if (!c->ssl) {
-        av_log(NULL, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), NULL));
+        av_log(h, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), NULL));
         ret = AVERROR(EIO);
         goto fail;
     }
@@ -166,7 +166,7 @@ static int tls_open(URLContext *h, const char *uri, int flags)
         if (ret > 0)
             break;
         if (ret == 0) {
-            av_log(NULL, AV_LOG_ERROR, "Unable to negotiate TLS/SSL session\n");
+            av_log(h, AV_LOG_ERROR, "Unable to negotiate TLS/SSL session\n");
             ret = AVERROR(EIO);
             goto fail;
         }



More information about the ffmpeg-cvslog mailing list