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

Function parse_icy

libavformat/http.c:967–987  ·  view source on GitHub ↗

Concat all Icy- header lines

Source from the content-addressed store, hash-verified

965
966// Concat all Icy- header lines
967static int parse_icy(HTTPContext *s, const char *tag, const char *p)
968{
969 int len = 4 + strlen(p) + strlen(tag);
970 int is_first = !s->icy_metadata_headers;
971 int ret;
972
973 av_dict_set(&s->metadata, tag, p, 0);
974
975 if (s->icy_metadata_headers)
976 len += strlen(s->icy_metadata_headers);
977
978 if ((ret = av_reallocp(&s->icy_metadata_headers, len)) < 0)
979 return ret;
980
981 if (is_first)
982 *s->icy_metadata_headers = '\0';
983
984 av_strlcatf(s->icy_metadata_headers, len, "%s: %s\n", tag, p);
985
986 return 0;
987}
988
989static int parse_http_date(const char *date_str, struct tm *buf)
990{

Callers 1

process_lineFunction · 0.85

Calls 3

av_dict_setFunction · 0.85
av_reallocpFunction · 0.85
av_strlcatfFunction · 0.85

Tested by

no test coverage detected