| 383 | } |
| 384 | |
| 385 | static int redirect_cache_set(HTTPContext *s, const char *source, const char *dest, int64_t expiry) |
| 386 | { |
| 387 | char *value; |
| 388 | int ret; |
| 389 | |
| 390 | value = av_asprintf("%"PRIi64";%s", expiry, dest); |
| 391 | if (!value) { |
| 392 | return AVERROR(ENOMEM); |
| 393 | } |
| 394 | |
| 395 | ret = av_dict_set(&s->redirect_cache, source, value, AV_DICT_MATCH_CASE | AV_DICT_DONT_STRDUP_VAL); |
| 396 | if (ret < 0) |
| 397 | return ret; |
| 398 | |
| 399 | return 0; |
| 400 | } |
| 401 | |
| 402 | /* return non zero if error */ |
| 403 | static int http_open_cnx(URLContext *h, AVDictionary **options) |
no test coverage detected