diff options
author | Gavin Kinsey <gkinsey@ad-holdings.co.uk> | 2012-05-29 14:43:33 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-30 15:45:05 +0200 |
commit | bf6fb563b99f3dc4586a8b9ee7578d3cc1a341fa (patch) | |
tree | f32763b76b04e13c7b8092917038d713532b00f4 /cmdutils.c | |
parent | f5af8d5e76a5726cbeba905363293c4ac5750c8d (diff) | |
download | ffmpeg-bf6fb563b99f3dc4586a8b9ee7578d3cc1a341fa.tar.gz |
Allow building of command line utils without swresample lib
This allows building ffprobe without swresample
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c index 2c8439499d..9b908f5316 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -69,7 +69,9 @@ void init_opts(void) sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, SWS_BICUBIC, NULL, NULL, NULL); #endif +#if CONFIG_SWRESAMPLE swr_opts = swr_alloc(); +#endif } void uninit_opts(void) @@ -78,7 +80,9 @@ void uninit_opts(void) sws_freeContext(sws_opts); sws_opts = NULL; #endif +#if CONFIG_SWRESAMPLE swr_free(&swr_opts); +#endif av_dict_free(&format_opts); av_dict_free(&codec_opts); } @@ -449,6 +453,7 @@ int opt_default(const char *opt, const char *arg) } } #endif +#if CONFIG_SWRESAMPLE swr_class = swr_get_class(); if (!oc && !of && !os && (oswr = av_opt_find(&swr_class, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { @@ -458,6 +463,7 @@ int opt_default(const char *opt, const char *arg) return ret; } } +#endif if (oc || of || os || oswr) return 0; |