90 if (!(p = *opaque))
return NULL;
101 memcpy(temp, protocol, size);
112 const char *filename,
int flags,
171 #define URL_SCHEME_CHARS \
172 "abcdefghijklmnopqrstuvwxyz" \
173 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
180 char proto_str[128], proto_nested[128], *ptr;
183 if (filename[proto_len] !=
':' ||
is_dos_path(filename))
184 strcpy(proto_str,
"file");
186 av_strlcpy(proto_str, filename,
FFMIN(proto_len+1,
sizeof(proto_str)));
188 av_strlcpy(proto_nested, proto_str,
sizeof(proto_nested));
189 if ((ptr = strchr(proto_nested,
'+')))
193 if (!strcmp(proto_str, up->
name))
196 !strcmp(proto_nested, up->
name))
206 int ret =
ffurl_alloc(puc, filename, flags, int_cb);
209 if (options && (*puc)->prot->priv_data_class &&
222 int (*transfer_func)(
URLContext *h,
unsigned char *buf,
int size))
225 int fast_retries = 5;
228 while (len < size_min) {
229 ret = transfer_func(h, buf+len, size-len);
243 fast_retries =
FFMAX(fast_retries, 2);