summaryrefslogtreecommitdiff
path: root/libavcodec/options_table.h
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-12-01 01:07:24 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-12-01 19:33:30 +0100
commitc9ff32215b433d505f251c1f212b1fa0a5e17b73 (patch)
treecbdbaaadd90ee4f16f0a4fe6afebea29e8a2c907 /libavcodec/options_table.h
parentb5cedf8b66c79bcc380d66dec0b850c8d7797c45 (diff)
lavu/opt: allow to set sample and pixel format with av_opt_set_int()
This change requires the user to specify min and max value, and makes possible to prevent the user to set AV_{SAMPLE,PIX}_FMT_NONE if forbidden. Add required ifdeffery in case of mixed libraries, when libavutil is updated but not the other libraries. This is a followup of 08d0969c1402ccec4dce44bd430128fb59d7b790.
Diffstat (limited to 'libavcodec/options_table.h')
-rw-r--r--libavcodec/options_table.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 411092ef8e..1ae93c1901 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -401,7 +401,7 @@ static const AVOption options[]={
{"em", "Emergency", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_EMERGENCY }, INT_MIN, INT_MAX, A|E, "audio_service_type"},
{"vo", "Voice Over", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_VOICE_OVER }, INT_MIN, INT_MAX, A|E, "audio_service_type"},
{"ka", "Karaoke", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_KARAOKE }, INT_MIN, INT_MAX, A|E, "audio_service_type"},
-{"request_sample_fmt", "sample format audio decoders should prefer", OFFSET(request_sample_fmt), AV_OPT_TYPE_SAMPLE_FMT, {.i64=AV_SAMPLE_FMT_NONE}, 0, 0, A|D, "request_sample_fmt"},
+{"request_sample_fmt", "sample format audio decoders should prefer", OFFSET(request_sample_fmt), AV_OPT_TYPE_SAMPLE_FMT, {.i64=AV_SAMPLE_FMT_NONE}, -1, AV_SAMPLE_FMT_NB-1, A|D, "request_sample_fmt"},
{"pkt_timebase", NULL, OFFSET(pkt_timebase), AV_OPT_TYPE_RATIONAL, {.dbl = 0 }, 0, INT_MAX, 0},
{NULL},
};