90 if (!(p = *opaque))
return NULL;
101 memcpy(temp, protocol, size);
112 const char *filename,
int flags,
137 int proto_len= strlen(up->
name);
138 char *start = strchr(uc->
filename,
',');
147 while(ret >= 0 && (key= strchr(p, sep)) && p<key && (val = strchr(key+1, sep))){
162 memmove(start, key+1, strlen(key));
196 #define URL_SCHEME_CHARS \
197 "abcdefghijklmnopqrstuvwxyz" \
198 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
205 char proto_str[128], proto_nested[128], *ptr;
208 if (!first_protocol) {
210 "Missing call to av_register_all()?\n");
213 if (filename[proto_len] !=
':' &&
214 (filename[proto_len] !=
',' || !strchr(filename + proto_len + 1,
':')) ||
216 strcpy(proto_str,
"file");
218 av_strlcpy(proto_str, filename,
FFMIN(proto_len+1,
sizeof(proto_str)));
220 if ((ptr = strchr(proto_str,
',')))
222 av_strlcpy(proto_nested, proto_str,
sizeof(proto_nested));
223 if ((ptr = strchr(proto_nested,
'+')))
227 if (!strcmp(proto_str, up->
name))
230 !strcmp(proto_nested, up->
name))
240 int ret =
ffurl_alloc(puc, filename, flags, int_cb);
243 if (options && (*puc)->prot->priv_data_class &&
256 int (*transfer_func)(
URLContext *h,
unsigned char *buf,
int size))
259 int fast_retries = 5;
260 int64_t wait_since = 0;
263 while (len < size_min) {
264 ret = transfer_func(h, buf+len, size-len);
283 return ret < 0 ? ret :
len;
285 fast_retries =
FFMAX(fast_retries, 2);