Commit 728e6d97 authored by Michael Niedermayer's avatar Michael Niedermayer

avio: print a warning from ffurl_alloc() if no protocols are allocated.

Fixes Ticket618

Based on code by teratorn
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 13b7781e
...@@ -223,6 +223,11 @@ int ffurl_alloc(URLContext **puc, const char *filename, int flags) ...@@ -223,6 +223,11 @@ int ffurl_alloc(URLContext **puc, const char *filename, int flags)
char proto_str[128], proto_nested[128], *ptr; char proto_str[128], proto_nested[128], *ptr;
size_t proto_len = strspn(filename, URL_SCHEME_CHARS); size_t proto_len = strspn(filename, URL_SCHEME_CHARS);
if (!first_protocol) {
av_log(NULL, AV_LOG_WARNING, "No URL Protocols are registered. "
"Missing call to av_register_all()?\n");
}
if (filename[proto_len] != ':' || is_dos_path(filename)) if (filename[proto_len] != ':' || is_dos_path(filename))
strcpy(proto_str, "file"); strcpy(proto_str, "file");
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment