Skip to content
Snippets Groups Projects
Commit d428ef0e authored by Jun Zhao's avatar Jun Zhao Committed by Jun Zhao
Browse files

lavf/network: add a ff_log_net_error function.


add a ff_log_net_error function for error log.

Signed-off-by: default avatarJun Zhao <mypopydev@gmail.com>
parent c2eec176
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......@@ -304,4 +304,6 @@ int ff_http_match_no_proxy(const char *no_proxy, const char *hostname);
int ff_socket(int domain, int type, int protocol);
void ff_log_net_error(void *ctx, int level, const char* prefix);
#endif /* AVFORMAT_NETWORK_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment