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

Function redirect_cache_set

libavformat/http.c:385–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385static 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 */
403static int http_open_cnx(URLContext *h, AVDictionary **options)

Callers 1

http_open_cnxFunction · 0.85

Calls 2

av_asprintfFunction · 0.85
av_dict_setFunction · 0.85

Tested by

no test coverage detected