diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-12 23:22:37 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-12 23:24:19 +0100 |
commit | 11ed7ec092d33511376cffdcb232bfd1f3f56dd7 (patch) | |
tree | e992800a317f90d7cd1099d929e8cb8f01a57d3d /libavformat | |
parent | b5c6b23acd6f48f8ac5b4c3f93b7b43a666fd3ec (diff) | |
parent | 6998a9f4c4e069f515c50614179f4cfc7d0184f5 (diff) | |
download | ffmpeg-11ed7ec092d33511376cffdcb232bfd1f3f56dd7.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
http: Properly initialize icy headers string
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/http.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index 34790df945..5e1c9abd89 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -410,6 +410,7 @@ static int parse_content_encoding(URLContext *h, const char *p) static int parse_icy(HTTPContext *s, const char *tag, const char *p) { int len = 4 + strlen(p) + strlen(tag); + int is_first = !s->icy_metadata_headers; int ret; if (s->icy_metadata_headers) @@ -418,6 +419,9 @@ static int parse_icy(HTTPContext *s, const char *tag, const char *p) if ((ret = av_reallocp(&s->icy_metadata_headers, len)) < 0) return ret; + if (is_first) + *s->icy_metadata_headers = '\0'; + av_strlcatf(s->icy_metadata_headers, len, "%s: %s\n", tag, p); return 0; |