Browse code

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>

Michael Niedermayer authored on 2011/11/07 12:18:53
Showing 1 changed files
... ...
@@ -223,6 +223,11 @@ int ffurl_alloc(URLContext **puc, const char *filename, int flags)
223 223
     char proto_str[128], proto_nested[128], *ptr;
224 224
     size_t proto_len = strspn(filename, URL_SCHEME_CHARS);
225 225
 
226
+    if (!first_protocol) {
227
+        av_log(NULL, AV_LOG_WARNING, "No URL Protocols are registered. "
228
+                                     "Missing call to av_register_all()?\n");
229
+    }
230
+
226 231
     if (filename[proto_len] != ':' || is_dos_path(filename))
227 232
         strcpy(proto_str, "file");
228 233
     else