diff mbox series

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

Message ID AM7PR03MB6660B26F21140FA6D4B00E838FD99@AM7PR03MB6660.eurprd03.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel,v2,01/14] avfilter/vsrc_testsrc: Deduplicate AVClasses | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 13, 2021, 11:23 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/avfilter.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Nicolas George Sept. 16, 2021, 12:38 p.m. UTC | #1
Andreas Rheinhardt (12021-09-14):
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavfilter/avfilter.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Looks ok.

Regards,
diff mbox series

Patch

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: