[FFmpeg-cvslog] cmdutils: Conditionally compile libswscale-related bits

Diego Biurrun git at videolan.org
Sat Aug 9 19:19:29 CEST 2014


ffmpeg | branch: release/0.10 | Diego Biurrun <diego at biurrun.de> | Mon Oct 29 18:00:14 2012 +0100| [28f2d3c5a5a3a3c14a68cf691054f15e4f23355a] | committer: Diego Biurrun

cmdutils: Conditionally compile libswscale-related bits

This fixes compilation with libswscale disabled.

(cherry picked from commit ab799664755c8bc2c439c428ff5b538c105a5c38)
Signed-off-by: Diego Biurrun <diego at biurrun.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=28f2d3c5a5a3a3c14a68cf691054f15e4f23355a
---

 cmdutils.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/cmdutils.c b/cmdutils.c
index e85f8d7..376d976 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -369,7 +369,10 @@ int opt_default(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);
@@ -383,6 +386,7 @@ int opt_default(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
@@ -392,6 +396,7 @@ int opt_default(const char *opt, const char *arg)
             return ret;
         }
     }
+#endif
 
     if (o)
         return 0;



More information about the ffmpeg-cvslog mailing list