aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/network.c
diff options
context:
space:
mode:
authorJun Zhao <mypopydev@gmail.com>2018-08-04 17:48:15 +0800
committerJun Zhao <jun.zhao@intel.com>2018-08-18 16:16:11 +0800
commitd428ef0ea58417456e4a84d1ed47c3935a6e0cfb (patch)
tree0c5626f13f9e1c7d4cbaa56cdc5aef012d2296cd /libavformat/network.c
parentc2eec1762d372663c35aaf3d6ee419bafb185057 (diff)
downloadffmpeg-d428ef0ea58417456e4a84d1ed47c3935a6e0cfb.tar.gz
lavf/network: add a ff_log_net_error function.
add a ff_log_net_error function for error log. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Diffstat (limited to 'libavformat/network.c')
-rw-r--r--libavformat/network.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/network.c b/libavformat/network.c
index d5c82e9ab9..21c836a0aa 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -346,3 +346,10 @@ int ff_http_match_no_proxy(const char *no_proxy, const char *hostname)
av_free(buf);
return ret;
}
+
+void ff_log_net_error(void *ctx, int level, const char* prefix)
+{
+ char errbuf[100];
+ av_strerror(ff_neterrno(), errbuf, sizeof(errbuf));
+ av_log(ctx, level, "%s: %s\n", prefix, errbuf);
+}