90 if (!(p = *opaque))
return NULL;
101 memcpy(temp, protocol, size);
105 while (*p != NULL) p = &(*p)->
next;
107 protocol->
next = NULL;
112 const char *filename,
int flags,
124 "Impossible to open the '%s' protocol for reading\n", up->
name);
129 "Impossible to open the '%s' protocol for writing\n", up->
name);
147 int proto_len= strlen(up->
name);
157 while(ret >= 0 && (key= strchr(p, sep)) && p<key && (val = strchr(key+1, sep))){
172 memmove(start, key+1, strlen(key));
206 #define URL_SCHEME_CHARS \
207 "abcdefghijklmnopqrstuvwxyz" \
208 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
215 char proto_str[128], proto_nested[128], *ptr;
218 if (!first_protocol) {
220 "Missing call to av_register_all()?\n");
223 if (filename[proto_len] !=
':' &&
224 (filename[proto_len] !=
',' || !strchr(filename + proto_len + 1,
':')) ||
226 strcpy(proto_str,
"file");
228 av_strlcpy(proto_str, filename,
FFMIN(proto_len+1,
sizeof(proto_str)));
230 if ((ptr = strchr(proto_str,
',')))
232 av_strlcpy(proto_nested, proto_str,
sizeof(proto_nested));
233 if ((ptr = strchr(proto_nested,
'+')))
237 if (!strcmp(proto_str, up->
name))
240 !strcmp(proto_nested, up->
name))
253 if (options && (*puc)->prot->priv_data_class &&
266 int (*transfer_func)(
URLContext *h,
unsigned char *buf,
int size))
269 int fast_retries = 5;
270 int64_t wait_since = 0;
273 while (len < size_min) {
274 ret = transfer_func(h, buf+len, size-len);
295 fast_retries =
FFMAX(fast_retries, 2);