[FFmpeg-devel] [PATCH v2 14/14] avfilter/avfilter: Report all unrecognized options in avfilter_init_str

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue Sep 14 02:23:39 EEST 2021


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavfilter/avfilter.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 4971ad9d9f..998db32d56 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -921,7 +921,7 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options)
 int avfilter_init_str(AVFilterContext *filter, const char *args)
 {
     AVDictionary *options = NULL;
-    AVDictionaryEntry *e;
+    const AVDictionaryEntry *e = NULL;
     int ret = 0;
 
     if (args && *args) {
@@ -934,10 +934,9 @@ int avfilter_init_str(AVFilterContext *filter, const char *args)
     if (ret < 0)
         goto fail;
 
-    if ((e = av_dict_get(options, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
+    while ((e = av_dict_get(options, "", e, AV_DICT_IGNORE_SUFFIX))) {
         av_log(filter, AV_LOG_ERROR, "No such option: %s.\n", e->key);
         ret = AVERROR_OPTION_NOT_FOUND;
-        goto fail;
     }
 
 fail:
-- 
2.30.2



More information about the ffmpeg-devel mailing list