Concat all Icy- header lines
| 965 | |
| 966 | // Concat all Icy- header lines |
| 967 | static 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 | |
| 989 | static int parse_http_date(const char *date_str, struct tm *buf) |
| 990 | { |
no test coverage detected