X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=cmdutils.c;h=1435317c451e762dab7773cd8141f1363419ae35;hb=79f2014f1264aeb9dae3134d3649aba6ca0d4d13;hp=3543edd0cb36317152d43e837b043f27a54001d6;hpb=2f63e83c26f15f5754c87bfbb9f101cd9a2a4b98;p=ffmpeg diff --git a/cmdutils.c b/cmdutils.c index 3543edd0cb3..1435317c451 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();