diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-09-19 17:20:26 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2015-10-03 20:26:09 +0300 |
commit | 254c64c574dfc427721942fa84e4d24d6b6cc4c2 (patch) | |
tree | d3343315c3508e6f1e83ac5622dd92c34403900b /cmdutils.c | |
parent | 8dc6e92c3dc67a85026f3010045c7a28b1c0adc8 (diff) |
cmdutils: silence unused warnings under --disable-swscale, --disable-swresample
This patch silences such warnings by placing initializations under a header guard,
see e.g
http://fate.ffmpeg.org/log.cgi?time=20150919095430&log=compile&slot=x86_64-archlinux-gcc-disableswscale,
http://fate.ffmpeg.org/log.cgi?time=20150919095048&log=compile&slot=x86_64-archlinux-gcc-disableswresample
for examples of such warnings.
It also has the benefit of placing library specific #defines next to each other.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cmdutils.c b/cmdutils.c index 3543edd0cb..1435317c45 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -533,7 +533,12 @@ int opt_default(void *optctx, const char *opt, const char *arg) #if CONFIG_AVRESAMPLE const AVClass *rc = avresample_get_class(); #endif - const AVClass *sc, *swr_class; +#if CONFIG_SWSCALE + const AVClass *sc = sws_get_class(); +#endif +#if CONFIG_SWRESAMPLE + const AVClass *swr_class = swr_get_class(); +#endif if (!strcmp(opt, "debug") || !strcmp(opt, "fdebug")) av_log_set_level(AV_LOG_DEBUG); @@ -557,7 +562,6 @@ int opt_default(void *optctx, const char *opt, const char *arg) consumed = 1; } #if CONFIG_SWSCALE - sc = sws_get_class(); if (!consumed && (o = opt_find(&sc, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { struct SwsContext *sws = sws_alloc_context(); @@ -585,7 +589,6 @@ int opt_default(void *optctx, const char *opt, const char *arg) } #endif #if CONFIG_SWRESAMPLE - swr_class = swr_get_class(); if (!consumed && (o=opt_find(&swr_class, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { struct SwrContext *swr = swr_alloc(); |