diff libmpcodecs/ve_lavc.c @ 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 9b4ba0fb999b
children 57a21cd090a1
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);