Unified · Split
| @@ -484,8 +484,8 @@ void remove_avoptions(AVDictionary **a, AVDictionary *b) · 483 unmodified lines | ||
| 484 | 484 | |
| 485 | 485 | int check_avoptions(AVDictionary *m) |
| 486 | 486 | { |
| 487 | − const AVDictionaryEntry *t; | |
| 488 | − if ((t = av_dict_get(m, "", NULL, AV_DICT_IGNORE_SUFFIX))) { | |
| 487 | + const AVDictionaryEntry *t = av_dict_iterate(m, NULL); | |
| 488 | + if (t) { | |
| 489 | 489 | av_log(NULL, AV_LOG_FATAL, "Option %s not found.\n", t->key); |
| 490 | 490 | return AVERROR_OPTION_NOT_FOUND; |
| 491 | 491 | } |
| @@ -2694,7 +2694,7 @@ static int stream_component_open(VideoState *is, int stream_index) · 2693 unmodified lines | ||
| 2694 | 2694 | if ((ret = avcodec_open2(avctx, codec, &opts)) < 0) { |
| 2695 | 2695 | goto fail; |
| 2696 | 2696 | } |
| 2697 | − if ((t = av_dict_get(opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { | |
| 2697 | + if ((t = av_dict_iterate(opts, NULL))) { | |
| 2698 | 2698 | av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key); |
| 2699 | 2699 | ret = AVERROR_OPTION_NOT_FOUND; |
| 2700 | 2700 | goto fail; |
| @@ -2862,7 +2862,7 @@ static int read_thread(void *arg) · 161 unmodified lines | ||
| 2862 | 2862 | if (scan_all_pmts_set) |
| 2863 | 2863 | av_dict_set(&format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE); |
| 2864 | 2864 | |
| 2865 | − if ((t = av_dict_get(format_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { | |
| 2865 | + if ((t = av_dict_iterate(format_opts, NULL))) { | |
| 2866 | 2866 | av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key); |
| 2867 | 2867 | ret = AVERROR_OPTION_NOT_FOUND; |
| 2868 | 2868 | goto fail; |
| @@ -3951,7 +3951,7 @@ static int open_input_file(InputFile *ifile, const char *filename, · 3950 unmodified lines | ||
| 3951 | 3951 | exit(1); |
| 3952 | 3952 | } |
| 3953 | 3953 | |
| 3954 | − if ((t = av_dict_get(opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { | |
| 3954 | + if ((t = av_dict_iterate(opts, NULL))) { | |
| 3955 | 3955 | av_log(NULL, AV_LOG_ERROR, "Option %s for input stream %d not found\n", |
| 3956 | 3956 | t->key, stream->index); |
| 3957 | 3957 | return AVERROR_OPTION_NOT_FOUND; |
| @@ -941,7 +941,7 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options) · 940 unmodified lines | ||
| 941 | 941 | int avfilter_init_str(AVFilterContext *filter, const char *args) |
| 942 | 942 | { |
| 943 | 943 | AVDictionary *options = NULL; |
| 944 | − AVDictionaryEntry *e; | |
| 944 | + const AVDictionaryEntry *e; | |
| 945 | 945 | int ret = 0; |
| 946 | 946 | |
| 947 | 947 | if (args && *args) { |
| @@ -954,7 +954,7 @@ int avfilter_init_str(AVFilterContext *filter, const char *args) · 6 unmodified lines | ||
| 954 | 954 | if (ret < 0) |
| 955 | 955 | goto fail; |
| 956 | 956 | |
| 957 | − if ((e = av_dict_get(options, "", NULL, AV_DICT_IGNORE_SUFFIX))) { | |
| 957 | + if ((e = av_dict_iterate(options, NULL))) { | |
| 958 | 958 | av_log(filter, AV_LOG_ERROR, "No such option: %s.\n", e->key); |
| 959 | 959 | ret = AVERROR_OPTION_NOT_FOUND; |
| 960 | 960 | goto fail; |
| @@ -119,7 +119,7 @@ static int adts_aac_read_header(AVFormatContext *s) · 118 unmodified lines | ||
| 119 | 119 | |
| 120 | 120 | ff_id3v1_read(s); |
| 121 | 121 | if ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) && |
| 122 | − !av_dict_get(s->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX)) { | |
| 122 | + !av_dict_count(s->metadata)) { | |
| 123 | 123 | int64_t cur = avio_tell(s->pb); |
| 124 | 124 | ff_ape_parse_tag(s); |
| 125 | 125 | avio_seek(s->pb, cur, SEEK_SET); |
| @@ -990,7 +990,7 @@ static int parse_set_cookie(const char *set_cookie, AVDictionary **dict) · 989 unmodified lines | ||
| 990 | 990 | static int parse_cookie(HTTPContext *s, const char *p, AVDictionary **cookies) |
| 991 | 991 | { |
| 992 | 992 | AVDictionary *new_params = NULL; |
| 993 | − AVDictionaryEntry *e, *cookie_entry; | |
| 993 | + const AVDictionaryEntry *e, *cookie_entry; | |
| 994 | 994 | char *eql, *name; |
| 995 | 995 | |
| 996 | 996 | // ensure the cookie is parsable |
| @@ -998,7 +998,7 @@ static int parse_cookie(HTTPContext *s, const char *p, AVDictionary **cookies) · 1 unmodified line | ||
| 998 | 998 | return -1; |
| 999 | 999 | |
| 1000 | 1000 | // if there is no cookie value there is nothing to parse |
| 1001 | − cookie_entry = av_dict_get(new_params, "", NULL, AV_DICT_IGNORE_SUFFIX); | |
| 1001 | + cookie_entry = av_dict_iterate(new_params, NULL); | |
| 1002 | 1002 | if (!cookie_entry || !cookie_entry->value) { |
| 1003 | 1003 | av_dict_free(&new_params); |
| 1004 | 1004 | return -1; |
| @@ -1300,7 +1300,7 @@ static int get_cookies(HTTPContext *s, char **cookies, const char *path, · 295 unmodified lines | ||
| 1300 | 1300 | *cookies = NULL; |
| 1301 | 1301 | while ((cookie = av_strtok(next, "\n", &saveptr)) && !ret) { |
| 1302 | 1302 | AVDictionary *cookie_params = NULL; |
| 1303 | − AVDictionaryEntry *cookie_entry, *e; | |
| 1303 | + const AVDictionaryEntry *cookie_entry, *e; | |
| 1304 | 1304 | |
| 1305 | 1305 | next = NULL; |
| 1306 | 1306 | // store the cookie in a dict in case it is updated in the response |
| @@ -1312,7 +1312,7 @@ static int get_cookies(HTTPContext *s, char **cookies, const char *path, · 5 unmodified lines | ||
| 1312 | 1312 | goto skip_cookie; |
| 1313 | 1313 | |
| 1314 | 1314 | // if the cookie has no value, skip it |
| 1315 | − cookie_entry = av_dict_get(cookie_params, "", NULL, AV_DICT_IGNORE_SUFFIX); | |
| 1315 | + cookie_entry = av_dict_iterate(cookie_params, NULL); | |
| 1316 | 1316 | if (!cookie_entry || !cookie_entry->value) |
| 1317 | 1317 | goto skip_cookie; |
| 1318 | 1318 | |
| @@ -112,7 +112,7 @@ static int mpc_read_header(AVFormatContext *s) · 111 unmodified lines | ||
| 112 | 112 | if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) { |
| 113 | 113 | int64_t pos = avio_tell(s->pb); |
| 114 | 114 | ff_ape_parse_tag(s); |
| 115 | − if (!av_dict_get(s->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX)) | |
| 115 | + if (av_dict_count(s->metadata) == 0) | |
| 116 | 116 | ff_id3v1_read(s); |
| 117 | 117 | avio_seek(s->pb, pos, SEEK_SET); |
| 118 | 118 | } |
| @@ -432,7 +432,7 @@ static int ogg_build_vp8_headers(AVFormatContext *s, AVStream *st, · 431 unmodified lines | ||
| 432 | 432 | bytestream_put_be32(&p, st->time_base.num); |
| 433 | 433 | |
| 434 | 434 | /* optional second packet: VorbisComment */ |
| 435 | − if (av_dict_get(st->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX)) { | |
| 435 | + if (av_dict_count(st->metadata)) { | |
| 436 | 436 | p = ogg_write_vorbiscomment(7, bitexact, &oggstream->header_len[1], &st->metadata, 0, NULL, 0); |
| 437 | 437 | if (!p) |
| 438 | 438 | return AVERROR(ENOMEM); |
| @@ -268,7 +268,7 @@ static int wv_read_header(AVFormatContext *s) · 267 unmodified lines | ||
| 268 | 268 | if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) { |
| 269 | 269 | int64_t cur = avio_tell(s->pb); |
| 270 | 270 | wc->apetag_start = ff_ape_parse_tag(s); |
| 271 | − if (!av_dict_get(s->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX)) | |
| 271 | + if (av_dict_count(s->metadata) == 0) | |
| 272 | 272 | ff_id3v1_read(s); |
| 273 | 273 | avio_seek(s->pb, cur, SEEK_SET); |
| 274 | 274 | } |