History

fftools, avfilter, avformat: Simplify check for "is dictionary empty?"

Andreas Rheinhardt committed 2 years ago

Commit f3d206d1 parent 482afe89 files · +15 −15Browse files

Showing the changes to libavfilter/avfilter.c (1 of 9 files). Show all

Unified · Split

libavfilter/avfilter.c+2−2
@@ -941,7 +941,7 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options) · 940 unmodified lines
941941 int avfilter_init_str(AVFilterContext *filter, const char *args)
942942 {
943943 AVDictionary *options = NULL;
944− AVDictionaryEntry *e;
944+ const AVDictionaryEntry *e;
945945 int ret = 0;
946946
947947 if (args && *args) {
@@ -954,7 +954,7 @@ int avfilter_init_str(AVFilterContext *filter, const char *args) · 6 unmodified lines
954954 if (ret < 0)
955955 goto fail;
956956
957− if ((e = av_dict_get(options, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
957+ if ((e = av_dict_iterate(options, NULL))) {
958958 av_log(filter, AV_LOG_ERROR, "No such option: %s.\n", e->key);
959959 ret = AVERROR_OPTION_NOT_FOUND;
960960 goto fail;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t