diff --git a/cmdutils.c b/cmdutils.c index 01abc51e9b..bba6f8c0b0 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -423,7 +423,10 @@ int opt_default(const char *opt, const char *arg) const AVOption *oc, *of, *os; char opt_stripped[128]; const char *p; - const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(), *sc; + const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(); +#if CONFIG_SWSCALE + const AVClass *sc = sws_get_class(); +#endif if (!(p = strchr(opt, ':'))) p = opt + strlen(opt); @@ -438,7 +441,6 @@ int opt_default(const char *opt, const char *arg) AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) av_dict_set(&format_opts, opt, arg, FLAGS(of)); #if CONFIG_SWSCALE - sc = sws_get_class(); if ((os = av_opt_find(&sc, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { // XXX we only support sws_flags, not arbitrary sws options