]> git.sesse.net Git - ffmpeg/blobdiff - cmdutils.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / cmdutils.c
index f7b24f65bda0943cfbce1cb9e4ff59a8004187f4..f0f1464ffa96b0b0d3061c480411b1764f5e5b07 100644 (file)
@@ -311,7 +311,7 @@ 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 = sws_get_class();
+    const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(), *sc;
 
     if (!(p = strchr(opt, ':')))
         p = opt + strlen(opt);
@@ -323,6 +323,8 @@ int opt_default(const char *opt, const char *arg)
         av_dict_set(&codec_opts, opt, arg, FLAGS(oc));
     if ((of = av_opt_find(&fc, opt, NULL, 0, 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
         int ret = av_set_string3(sws_opts, opt, arg, 1, NULL);
@@ -331,6 +333,7 @@ int opt_default(const char *opt, const char *arg)
             return ret;
         }
     }
+#endif
 
     if (oc || of || os)
         return 0;