cmdutils: fix null pointer dereference
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 24 Feb 2013 19:16:17 +0000 (20:16 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 24 Feb 2013 19:31:56 +0000 (20:31 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
cmdutils.c

index 50a1ff8..3e0dfbc 100644 (file)
@@ -530,8 +530,8 @@ int opt_default(void *optctx, const char *opt, const char *arg)
 #endif
 #if CONFIG_AVRESAMPLE
     rc_class = avresample_get_class();
-    if (av_opt_find(&rc_class, opt, NULL, 0,
-                    AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) {
+    if ((o=av_opt_find(&rc_class, opt, NULL, 0,
+                       AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
         av_dict_set(&resample_opts, opt, arg, FLAGS);
         consumed = 1;
     }