diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2013-12-16 16:29:44 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2013-12-26 11:35:27 +0100 |
commit | 334e2e23638349333f1a8b231599a28fb7fc3fab (patch) | |
tree | 427262fe35ce3fa2483483ce59f5c931ba14b5b7 /libavutil/opt.c | |
parent | 3b8c7da7a36d30f8184976ea2158b534595e7738 (diff) | |
download | ffmpeg-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 'libavutil/opt.c')
-rw-r--r-- | libavutil/opt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index 5060b29391..07864f25c9 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1601,7 +1601,7 @@ static const AVOption test_options[]= { {"mu", "set mu flag ", 0, AV_OPT_TYPE_CONST, {.i64 = TEST_FLAG_MU}, INT_MIN, INT_MAX, 0, "flags" }, {"size", "set size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE,{0}, 0, 0 }, {"pix_fmt", "set pixfmt", OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64 = AV_PIX_FMT_NONE}, -1, INT_MAX}, -{"sample_fmt", "set samplefmt", OFFSET(sample_fmt), AV_OPT_TYPE_SAMPLE_FMT, {.i64 = AV_SAMPLE_FMT_NONE}, -1, AV_SAMPLE_FMT_NB-1}, +{"sample_fmt", "set samplefmt", OFFSET(sample_fmt), AV_OPT_TYPE_SAMPLE_FMT, {.i64 = AV_SAMPLE_FMT_NONE}, -1, INT_MAX}, {"video_rate", "set videorate", OFFSET(video_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0 }, {"duration", "set duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 0}, 0, INT64_MAX}, {"color", "set color", OFFSET(color), AV_OPT_TYPE_COLOR, {.str = "pink"}, 0, 0}, |