MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / redirect_cache_get

Function redirect_cache_get

libavformat/http.c:361–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361static char *redirect_cache_get(HTTPContext *s)
362{
363 AVDictionaryEntry *re;
364 int64_t expiry;
365 char *delim;
366
367 re = av_dict_get(s->redirect_cache, s->location, NULL, AV_DICT_MATCH_CASE);
368 if (!re) {
369 return NULL;
370 }
371
372 delim = strchr(re->value, ';');
373 if (!delim) {
374 return NULL;
375 }
376
377 expiry = strtoll(re->value, NULL, 10);
378 if (time(NULL) > expiry) {
379 return NULL;
380 }
381
382 return delim + 1;
383}
384
385static int redirect_cache_set(HTTPContext *s, const char *source, const char *dest, int64_t expiry)
386{

Callers 1

http_open_cnxFunction · 0.85

Calls 1

av_dict_getFunction · 0.85

Tested by

no test coverage detected