avformat/http: add "Opening" info logging to ff_http_do_new_request
authorAman Gupta <aman@tmm1.net>
Wed, 13 Dec 2017 00:02:09 +0000 (16:02 -0800)
committerAman Gupta <aman@tmm1.net>
Fri, 22 Dec 2017 22:42:50 +0000 (14:42 -0800)
This mimics logging that was added in 53e0d5d7247 for security
purposes.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/http.c

index a3c3642..ffdf11c 100644 (file)
@@ -336,6 +336,7 @@ int ff_http_do_new_request(URLContext *h, const char *uri)
     if (!s->location)
         return AVERROR(ENOMEM);
 
+    av_log(s, AV_LOG_INFO, "Opening \'%s\' for %s\n", uri, h->flags & AVIO_FLAG_WRITE ? "writing" : "reading");
     ret = http_open_cnx(h, &options);
     av_dict_free(&options);
     return ret;