[FFmpeg-cvslog] avio: print a warning from ffurl_alloc() if no protocols are allocated.
Michael Niedermayer
git at videolan.org
Mon Nov 7 04:27:25 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Nov 7 04:18:53 2011 +0100| [728e6d979bb16b2e19db96869a7af80c24eb7aeb] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=728e6d979bb16b2e19db96869a7af80c24eb7aeb
---
libavformat/avio.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 2bdad73..47b2d51 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
More information about the ffmpeg-cvslog
mailing list