diff options
author | Martin Storsjö <martin@martin.st> | 2011-11-03 14:12:14 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-11-04 12:46:33 +0200 |
commit | adc85ce20bc18c7f2074e1e88d0eeaffde810ea4 (patch) | |
tree | 48fbfa18fa057a0ec7c42cde3d8daa7d194dae7b | |
parent | 76718f3fb75a7c2ba790ba7a110059fc120ee25e (diff) | |
download | ffmpeg-adc85ce20bc18c7f2074e1e88d0eeaffde810ea4.tar.gz |
avcodec: Set flags2 default value depending on availability
This makes the code compile when FF_API_X264_GLOBAL_OPTS or
FF_API_LAME_GLOBAL_OPTS is 0.
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavcodec/options.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c index a08ed98cce..ef7a39a7c9 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -351,7 +351,17 @@ static const AVOption options[]={ {"nr", "noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, {"rc_init_occupancy", "number of bits which should be loaded into the rc buffer before decoding starts", OFFSET(rc_initial_buffer_occupancy), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, {"inter_threshold", NULL, OFFSET(inter_threshold), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"flags2", NULL, OFFSET(flags2), AV_OPT_TYPE_FLAGS, {.dbl = CODEC_FLAG2_FASTPSKIP|CODEC_FLAG2_BIT_RESERVOIR|CODEC_FLAG2_PSY|CODEC_FLAG2_MBTREE }, 0, UINT_MAX, V|A|E|D, "flags2"}, +#if FF_API_X264_GLOBAL_OPTS +#define X264_DEFAULTS CODEC_FLAG2_FASTPSKIP|CODEC_FLAG2_PSY|CODEC_FLAG2_MBTREE +#else +#define X264_DEFAULTS 0 +#endif +#if FF_API_LAME_GLOBAL_OPTS +#define LAME_DEFAULTS CODEC_FLAG2_BIT_RESERVOIR +#else +#define LAME_DEFAULTS 0 +#endif +{"flags2", NULL, OFFSET(flags2), AV_OPT_TYPE_FLAGS, {.dbl = X264_DEFAULTS|LAME_DEFAULTS }, 0, UINT_MAX, V|A|E|D, "flags2"}, {"error", NULL, OFFSET(error_rate), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, #if FF_API_ANTIALIAS_ALGO {"antialias", "MP3 antialias algorithm", OFFSET(antialias_algo), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|D, "aa"}, |