changeset 36150:98eb9f802619

Fix incorrect error printing code. The code worked during testing by pure dumb luck, the right pointer ended up just at the right place by chance.
author reimar
date Tue, 07 May 2013 20:39:15 +0000
parents f69d9caa3d84
children 63bc09af21f4
files libmpcodecs/ve_lavc.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ve_lavc.c	Tue May 07 20:39:14 2013 +0000
+++ b/libmpcodecs/ve_lavc.c	Tue May 07 20:39:15 2013 +0000
@@ -667,8 +667,9 @@
 	return 0;
     }
     if (av_dict_count(opts)) {
-        AVDictionaryEntry *e = av_dict_get(opts, "", NULL, 0);
-        mp_msg(MSGT_MENCODER,MSGL_ERR,"Unknown option %s\n");
+        AVDictionaryEntry *e = NULL;
+        while ((e = av_dict_get(opts, "", e, AV_DICT_IGNORE_SUFFIX)))
+            mp_msg(MSGT_MENCODER,MSGL_ERR,"Unknown option %s\n", e->key);
         return 0;
     }
     av_dict_free(&opts);