aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/options_table.h
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-12-16 16:29:44 +0100
committerStefano Sabatini <stefasab@gmail.com>2013-12-26 11:35:27 +0100
commit334e2e23638349333f1a8b231599a28fb7fc3fab (patch)
tree427262fe35ce3fa2483483ce59f5c931ba14b5b7 /libavcodec/options_table.h
parent3b8c7da7a36d30f8184976ea2158b534595e7738 (diff)
downloadffmpeg-334e2e23638349333f1a8b231599a28fb7fc3fab.tar.gz
lavu,lavc,lswr: do not hardcode AV_SAMPLE_FMT_NB value when setting sample format max value
The constant may change in libavutil but the library may be compiled against an older version, thus rejecting a value which is otherwise supported by the new libavutil. INT_MAX is used here to denote the max allowed value for a sample format. The opt-test code is changed to provide a valid reference example.
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 49af29cbcc..c82c104cb6 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -386,7 +386,7 @@ static const AVOption avcodec_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}, -1, AV_SAMPLE_FMT_NB-1, 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, INT_MAX, A|D, "request_sample_fmt"},
{"pkt_timebase", NULL, OFFSET(pkt_timebase), AV_OPT_TYPE_RATIONAL, {.dbl = 0 }, 0, INT_MAX, 0},
{"sub_charenc", "set input text subtitles character encoding", OFFSET(sub_charenc), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, S|D},
{"sub_charenc_mode", "set input text subtitles character encoding mode", OFFSET(sub_charenc_mode), AV_OPT_TYPE_FLAGS, {.i64 = FF_SUB_CHARENC_MODE_AUTOMATIC}, -1, INT_MAX, S|D, "sub_charenc_mode"},