cmdutils: only use libavresample when it is enabled
avprobe and avserver use cmdutils and do not strictly require libavresample.
This commit is contained in:
parent
699d02b839
commit
e8da807537
@ -406,7 +406,9 @@ int opt_default(void *optctx, const char *opt, const char *arg)
|
|||||||
char opt_stripped[128];
|
char opt_stripped[128];
|
||||||
const char *p;
|
const char *p;
|
||||||
const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class();
|
const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class();
|
||||||
|
#if CONFIG_AVRESAMPLE
|
||||||
const AVClass *rc = avresample_get_class();
|
const AVClass *rc = avresample_get_class();
|
||||||
|
#endif
|
||||||
#if CONFIG_SWSCALE
|
#if CONFIG_SWSCALE
|
||||||
const AVClass *sc = sws_get_class();
|
const AVClass *sc = sws_get_class();
|
||||||
#endif
|
#endif
|
||||||
@ -423,9 +425,11 @@ int opt_default(void *optctx, const char *opt, const char *arg)
|
|||||||
else if ((o = av_opt_find(&fc, opt, NULL, 0,
|
else if ((o = av_opt_find(&fc, opt, NULL, 0,
|
||||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)))
|
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)))
|
||||||
av_dict_set(&format_opts, opt, arg, FLAGS);
|
av_dict_set(&format_opts, opt, arg, FLAGS);
|
||||||
|
#if CONFIG_AVRESAMPLE
|
||||||
else if ((o = av_opt_find(&rc, opt, NULL, 0,
|
else if ((o = av_opt_find(&rc, opt, NULL, 0,
|
||||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)))
|
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)))
|
||||||
av_dict_set(&resample_opts, opt, arg, FLAGS);
|
av_dict_set(&resample_opts, opt, arg, FLAGS);
|
||||||
|
#endif
|
||||||
#if CONFIG_SWSCALE
|
#if CONFIG_SWSCALE
|
||||||
else if ((o = av_opt_find(&sc, opt, NULL, 0,
|
else if ((o = av_opt_find(&sc, opt, NULL, 0,
|
||||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
|
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user