diff options
author | Martin Storsjö <martin@martin.st> | 2012-08-31 13:22:31 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-09-04 23:13:44 +0300 |
commit | e6153f173a49e5bfa70b0c04d2f82930533597b9 (patch) | |
tree | 7eac138db7402d4c6692433af9efdc8a30d4a486 /libavfilter | |
parent | d58dd4b5b5d31cfd4092e38a5f2c894eee2ab078 (diff) | |
download | ffmpeg-e6153f173a49e5bfa70b0c04d2f82930533597b9.tar.gz |
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_amix.c | 4 | ||||
-rw-r--r-- | libavfilter/af_asyncts.c | 4 | ||||
-rw-r--r-- | libavfilter/af_join.c | 2 | ||||
-rw-r--r-- | libavfilter/buffersrc.c | 2 | ||||
-rw-r--r-- | libavfilter/vf_delogo.c | 14 | ||||
-rw-r--r-- | libavfilter/vf_drawtext.c | 12 | ||||
-rw-r--r-- | libavfilter/vsrc_movie.c | 4 |
7 files changed, 21 insertions, 21 deletions
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index 853adfb19c..1e9edc5f2b 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -176,9 +176,9 @@ typedef struct MixContext { #define A AV_OPT_FLAG_AUDIO_PARAM static const AVOption options[] = { { "inputs", "Number of inputs.", - OFFSET(nb_inputs), AV_OPT_TYPE_INT, { 2 }, 1, 32, A }, + OFFSET(nb_inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, 32, A }, { "duration", "How to determine the end-of-stream.", - OFFSET(duration_mode), AV_OPT_TYPE_INT, { DURATION_LONGEST }, 0, 2, A, "duration" }, + OFFSET(duration_mode), AV_OPT_TYPE_INT, { .i64 = DURATION_LONGEST }, 0, 2, A, "duration" }, { "longest", "Duration of longest input.", 0, AV_OPT_TYPE_CONST, { .i64 = DURATION_LONGEST }, INT_MIN, INT_MAX, A, "duration" }, { "shortest", "Duration of shortest input.", 0, AV_OPT_TYPE_CONST, { .i64 = DURATION_SHORTEST }, INT_MIN, INT_MAX, A, "duration" }, { "first", "Duration of first input.", 0, AV_OPT_TYPE_CONST, { .i64 = DURATION_FIRST }, INT_MIN, INT_MAX, A, "duration" }, diff --git a/libavfilter/af_asyncts.c b/libavfilter/af_asyncts.c index 1f38232f1a..a481efd92f 100644 --- a/libavfilter/af_asyncts.c +++ b/libavfilter/af_asyncts.c @@ -46,10 +46,10 @@ typedef struct ASyncContext { #define OFFSET(x) offsetof(ASyncContext, x) #define A AV_OPT_FLAG_AUDIO_PARAM static const AVOption options[] = { - { "compensate", "Stretch/squeeze the data to make it match the timestamps", OFFSET(resample), AV_OPT_TYPE_INT, { 0 }, 0, 1, A }, + { "compensate", "Stretch/squeeze the data to make it match the timestamps", OFFSET(resample), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, A }, { "min_delta", "Minimum difference between timestamps and audio data " "(in seconds) to trigger padding/trimmin the data.", OFFSET(min_delta_sec), AV_OPT_TYPE_FLOAT, { 0.1 }, 0, INT_MAX, A }, - { "max_comp", "Maximum compensation in samples per second.", OFFSET(max_comp), AV_OPT_TYPE_INT, { 500 }, 0, INT_MAX, A }, + { "max_comp", "Maximum compensation in samples per second.", OFFSET(max_comp), AV_OPT_TYPE_INT, { .i64 = 500 }, 0, INT_MAX, A }, { "first_pts", "Assume the first pts should be this value.", OFFSET(pts), AV_OPT_TYPE_INT64, { .i64 = AV_NOPTS_VALUE }, INT64_MIN, INT64_MAX, A }, { NULL }, }; diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index c44788bd80..bf939feeaa 100644 --- a/libavfilter/af_join.c +++ b/libavfilter/af_join.c @@ -77,7 +77,7 @@ typedef struct JoinBufferPriv { #define OFFSET(x) offsetof(JoinContext, x) #define A AV_OPT_FLAG_AUDIO_PARAM static const AVOption join_options[] = { - { "inputs", "Number of input streams.", OFFSET(inputs), AV_OPT_TYPE_INT, { 2 }, 1, INT_MAX, A }, + { "inputs", "Number of input streams.", OFFSET(inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, INT_MAX, A }, { "channel_layout", "Channel layout of the " "output stream.", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, {.str = "stereo"}, 0, 0, A }, { "map", "A comma-separated list of channels maps in the format " diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 5f4e9b7496..62b9e99cbf 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -193,7 +193,7 @@ static av_cold int init_video(AVFilterContext *ctx, const char *args) #define A AV_OPT_FLAG_AUDIO_PARAM static const AVOption audio_options[] = { { "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { 0 }, 0, INT_MAX, A }, - { "sample_rate", NULL, OFFSET(sample_rate), AV_OPT_TYPE_INT, { 0 }, 0, INT_MAX, A }, + { "sample_rate", NULL, OFFSET(sample_rate), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, A }, { "sample_fmt", NULL, OFFSET(sample_fmt_str), AV_OPT_TYPE_STRING, .flags = A }, { "channel_layout", NULL, OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, .flags = A }, { NULL }, diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index 2b4705bf46..86b625cdd1 100644 --- a/libavfilter/vf_delogo.c +++ b/libavfilter/vf_delogo.c @@ -138,13 +138,13 @@ typedef struct { #define OFFSET(x) offsetof(DelogoContext, x) static const AVOption delogo_options[]= { - {"x", "set logo x position", OFFSET(x), AV_OPT_TYPE_INT, {-1}, -1, INT_MAX }, - {"y", "set logo y position", OFFSET(y), AV_OPT_TYPE_INT, {-1}, -1, INT_MAX }, - {"w", "set logo width", OFFSET(w), AV_OPT_TYPE_INT, {-1}, -1, INT_MAX }, - {"h", "set logo height", OFFSET(h), AV_OPT_TYPE_INT, {-1}, -1, INT_MAX }, - {"band", "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { 4}, -1, INT_MAX }, - {"t", "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { 4}, -1, INT_MAX }, - {"show", "show delogo area", OFFSET(show), AV_OPT_TYPE_INT, { 0}, 0, 1 }, + {"x", "set logo x position", OFFSET(x), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX }, + {"y", "set logo y position", OFFSET(y), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX }, + {"w", "set logo width", OFFSET(w), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX }, + {"h", "set logo height", OFFSET(h), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX }, + {"band", "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, {.i64 = 4}, -1, INT_MAX }, + {"t", "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, {.i64 = 4}, -1, INT_MAX }, + {"show", "show delogo area", OFFSET(show), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1 }, {NULL}, }; diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 06ecd712cf..7aeea86ce1 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -154,16 +154,16 @@ static const AVOption drawtext_options[]= { {"fontcolor","set foreground color", OFFSET(fontcolor_string), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, {"boxcolor", "set box color", OFFSET(boxcolor_string), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, {"shadowcolor", "set shadow color", OFFSET(shadowcolor_string), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, -{"box", "set box", OFFSET(draw_box), AV_OPT_TYPE_INT, {.dbl=0}, 0, 1 }, -{"fontsize", "set font size", OFFSET(fontsize), AV_OPT_TYPE_INT, {.dbl=16}, 1, 72 }, +{"box", "set box", OFFSET(draw_box), AV_OPT_TYPE_INT, {.i64=0}, 0, 1 }, +{"fontsize", "set font size", OFFSET(fontsize), AV_OPT_TYPE_INT, {.i64=16}, 1, 72 }, {"x", "set x", OFFSET(x_expr), AV_OPT_TYPE_STRING, {.str="0"}, CHAR_MIN, CHAR_MAX }, {"y", "set y", OFFSET(y_expr), AV_OPT_TYPE_STRING, {.str="0"}, CHAR_MIN, CHAR_MAX }, -{"shadowx", "set x", OFFSET(shadowx), AV_OPT_TYPE_INT, {.dbl=0}, INT_MIN, INT_MAX }, -{"shadowy", "set y", OFFSET(shadowy), AV_OPT_TYPE_INT, {.dbl=0}, INT_MIN, INT_MAX }, -{"tabsize", "set tab size", OFFSET(tabsize), AV_OPT_TYPE_INT, {.dbl=4}, 0, INT_MAX }, +{"shadowx", "set x", OFFSET(shadowx), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX }, +{"shadowy", "set y", OFFSET(shadowy), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX }, +{"tabsize", "set tab size", OFFSET(tabsize), AV_OPT_TYPE_INT, {.i64=4}, 0, INT_MAX }, {"draw", "if false do not draw", OFFSET(d_expr), AV_OPT_TYPE_STRING, {.str="1"}, CHAR_MIN, CHAR_MAX }, {"fix_bounds", "if true, check and fix text coords to avoid clipping", - OFFSET(fix_bounds), AV_OPT_TYPE_INT, {.dbl=1}, 0, 1 }, + OFFSET(fix_bounds), AV_OPT_TYPE_INT, {.i64=1}, 0, 1 }, /* FT_LOAD_* flags */ {"ft_load_flags", "set font loading flags for libfreetype", OFFSET(ft_load_flags), AV_OPT_TYPE_FLAGS, {.i64=FT_LOAD_DEFAULT|FT_LOAD_RENDER}, 0, INT_MAX, 0, "ft_load_flags" }, diff --git a/libavfilter/vsrc_movie.c b/libavfilter/vsrc_movie.c index 926d57dff5..09871febef 100644 --- a/libavfilter/vsrc_movie.c +++ b/libavfilter/vsrc_movie.c @@ -62,8 +62,8 @@ typedef struct { static const AVOption movie_options[]= { {"format_name", "set format name", OFFSET(format_name), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX }, {"f", "set format name", OFFSET(format_name), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX }, -{"stream_index", "set stream index", OFFSET(stream_index), AV_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX }, -{"si", "set stream index", OFFSET(stream_index), AV_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX }, +{"stream_index", "set stream index", OFFSET(stream_index), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX }, +{"si", "set stream index", OFFSET(stream_index), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX }, {"seek_point", "set seekpoint (seconds)", OFFSET(seek_point_d), AV_OPT_TYPE_DOUBLE, {.dbl = 0}, 0, (INT64_MAX-1) / 1000000 }, {"sp", "set seekpoint (seconds)", OFFSET(seek_point_d), AV_OPT_TYPE_DOUBLE, {.dbl = 0}, 0, (INT64_MAX-1) / 1000000 }, {NULL}, |