summaryrefslogtreecommitdiff
path: root/cmdutils.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-10-29 18:00:14 +0100
committerDiego Biurrun <diego@biurrun.de>2012-10-29 19:02:12 +0100
commitab799664755c8bc2c439c428ff5b538c105a5c38 (patch)
tree1d9f8a6a047b6a9313e283cc7ad7d44b3438185c /cmdutils.c
parent72c758f1fd06e812a2075bae836ec18891d99852 (diff)
cmdutils: Conditionally compile libswscale-related bits
This fixes compilation with libswscale disabled.
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 6570968526..630301ffa2 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -371,7 +371,10 @@ int opt_default(void *optctx, const char *opt, const char *arg)
const AVOption *o;
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();
+#if CONFIG_SWSCALE
+ const AVClass *sc = sws_get_class();
+#endif
if (!(p = strchr(opt, ':')))
p = opt + strlen(opt);
@@ -385,6 +388,7 @@ int opt_default(void *optctx, const char *opt, const char *arg)
else if ((o = av_opt_find(&fc, opt, NULL, 0,
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)))
av_dict_set(&format_opts, opt, arg, FLAGS);
+#if CONFIG_SWSCALE
else if ((o = 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
@@ -394,6 +398,7 @@ int opt_default(void *optctx, const char *opt, const char *arg)
return ret;
}
}
+#endif
if (o)
return 0;