diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-05 14:52:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-05 14:52:52 +0200 |
commit | 8510150f48ef3a2008f97af6c4618f150a60edd7 (patch) | |
tree | 8767933672698895900a32e6e517ab3752445186 | |
parent | 98840ee0174b227543f2c85f3df09e97ad4f2577 (diff) | |
parent | 21bc44038491e525335ad763883b0288402ff6a0 (diff) | |
download | ffmpeg-8510150f48ef3a2008f97af6c4618f150a60edd7.tar.gz |
Merge commit '21bc44038491e525335ad763883b0288402ff6a0'
* commit '21bc44038491e525335ad763883b0288402ff6a0':
avopt: Explicitly store rational option defaults in .dbl
Conflicts:
libavfilter/buffersrc.c
libavfilter/vsrc_testsrc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/buffersrc.c | 8 | ||||
-rw-r--r-- | libavutil/opt.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 29e5b8684e..25c6386d4e 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -170,11 +170,11 @@ unsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src) #define OFFSET(x) offsetof(BufferSourceContext, x) #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM static const AVOption buffer_options[] = { - { "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { 0 }, 0, INT_MAX, FLAGS }, - { "frame_rate", NULL, OFFSET(frame_rate), AV_OPT_TYPE_RATIONAL, { 0 }, 0, INT_MAX, FLAGS }, + { "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, INT_MAX, FLAGS }, + { "frame_rate", NULL, OFFSET(frame_rate), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, INT_MAX, FLAGS }, { "video_size", NULL, OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, .flags = FLAGS }, { "pix_fmt", NULL, OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, .flags = FLAGS }, - { "pixel_aspect", NULL, OFFSET(pixel_aspect), AV_OPT_TYPE_RATIONAL, { 0 }, 0, INT_MAX, FLAGS }, + { "pixel_aspect", NULL, OFFSET(pixel_aspect), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, INT_MAX, FLAGS }, { "sws_param", NULL, OFFSET(sws_param), AV_OPT_TYPE_STRING, .flags = FLAGS }, { NULL }, }; @@ -239,7 +239,7 @@ fail: #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_AUDIO_PARAM static const AVOption abuffer_options[] = { - { "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { 0 }, 0, INT_MAX, FLAGS }, + { "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, INT_MAX, FLAGS }, { "sample_rate", NULL, OFFSET(sample_rate), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS }, { "sample_fmt", NULL, OFFSET(sample_fmt_str), AV_OPT_TYPE_STRING, .flags = FLAGS }, { "channel_layout", NULL, OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, .flags = FLAGS }, diff --git a/libavutil/opt.c b/libavutil/opt.c index 18af0edec3..960170b86f 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -906,7 +906,7 @@ typedef struct TestContext static const AVOption test_options[]= { {"num", "set num", OFFSET(num), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 100 }, {"toggle", "set toggle", OFFSET(toggle), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1 }, -{"rational", "set rational", OFFSET(rational), AV_OPT_TYPE_RATIONAL, {0}, 0, 10 }, +{"rational", "set rational", OFFSET(rational), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10 }, {"string", "set string", OFFSET(string), AV_OPT_TYPE_STRING, {0}, CHAR_MIN, CHAR_MAX }, {"flags", "set flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, 0, INT_MAX, 0, "flags" }, {"cool", "set cool flag ", 0, AV_OPT_TYPE_CONST, {.i64 = TEST_FLAG_COOL}, INT_MIN, INT_MAX, 0, "flags" }, |