From f3abdf4392a146462dc679846c061b8bf2b5c7a0 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 24 Feb 2013 20:16:17 +0100 Subject: [PATCH] cmdutils: fix null pointer dereference Signed-off-by: Michael Niedermayer --- cmdutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmdutils.c b/cmdutils.c index 50a1ff8d72..3e0dfbce67 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -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; }