summaryrefslogtreecommitdiff
path: root/libavformat/avio.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-07 04:18:53 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-07 04:24:49 +0100
commit728e6d979bb16b2e19db96869a7af80c24eb7aeb (patch)
tree5f4902a95fb69e401563272f9d36dedc7fa3515f /libavformat/avio.c
parent13b7781ec8d475513c1ee40a6e481763b728a71e (diff)
avio: print a warning from ffurl_alloc() if no protocols are allocated.
Fixes Ticket618 Based on code by teratorn Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r--libavformat/avio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 2bdad73d88..47b2d51ebd 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -223,6 +223,11 @@ int ffurl_alloc(URLContext **puc, const char *filename, int flags)
char proto_str[128], proto_nested[128], *ptr;
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))
strcpy(proto_str, "file");
else