diff options
author | Marvin Scholz <epirat07@gmail.com> | 2022-11-26 15:46:46 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-12-01 11:21:15 +0100 |
commit | 643c2b4722281a125e1cb86f517a7dbc442a37ac (patch) | |
tree | 0f19c7a47785f15e7a31e4ba22e87f0769cdaa80 | |
parent | fb93d3d04393086699d5d0e237cba622cbc725cd (diff) | |
download | ffmpeg-643c2b4722281a125e1cb86f517a7dbc442a37ac.tar.gz |
avformat/http: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavformat/http.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index c5c48c7900..7bce821535 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -1021,11 +1021,11 @@ static int parse_cookie(HTTPContext *s, const char *p, AVDictionary **cookies) static int cookie_string(AVDictionary *dict, char **cookies) { - AVDictionaryEntry *e = NULL; + const AVDictionaryEntry *e = NULL; int len = 1; // determine how much memory is needed for the cookies string - while (e = av_dict_get(dict, "", e, AV_DICT_IGNORE_SUFFIX)) + while ((e = av_dict_iterate(dict, e))) len += strlen(e->key) + strlen(e->value) + 1; // reallocate the cookies @@ -1036,7 +1036,7 @@ static int cookie_string(AVDictionary *dict, char **cookies) *cookies[0] = '\0'; // write out the cookies - while (e = av_dict_get(dict, "", e, AV_DICT_IGNORE_SUFFIX)) + while ((e = av_dict_iterate(dict, e))) av_strlcatf(*cookies, len, "%s%s\n", e->key, e->value); return 0; |