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 (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
941int avfilter_init_str(AVFilterContext *filter, const char *args)941int avfilter_init_str(AVFilterContext *filter, const char *args)
942{942{
943 AVDictionary *options = NULL;943 AVDictionary *options = NULL;
944 AVDictionaryEntry *e;944 const AVDictionaryEntry *e;
945 int ret = 0;945 int ret = 0;
946 946
947 if (args && *args) {947 if (args && *args) {
@@ -954,7 +954,7 @@ int avfilter_init_str(AVFilterContext *filter, const char *args) · 6 unmodified lines
954 if (ret < 0)954 if (ret < 0)
955 goto fail;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 av_log(filter, AV_LOG_ERROR, "No such option: %s.\n", e->key);958 av_log(filter, AV_LOG_ERROR, "No such option: %s.\n", e->key);
959 ret = AVERROR_OPTION_NOT_FOUND;959 ret = AVERROR_OPTION_NOT_FOUND;
960 goto fail;960 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