|
|
|
@ -86,7 +86,7 @@ static const AVOptionArrayDef array_dict = { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
static const AVOption test_options[]= { |
|
|
|
|
{"num", "set num", OFFSET(num), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 100, 1 }, |
|
|
|
|
{"num", "set num", OFFSET(num), AV_OPT_TYPE_INT, { .i64 = 0 }, -1, 100, 1 }, |
|
|
|
|
{"toggle", "set toggle", OFFSET(toggle), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, 1 }, |
|
|
|
|
{"rational", "set rational", OFFSET(rational), AV_OPT_TYPE_RATIONAL, { .dbl = 1 }, 0, 10, 1 }, |
|
|
|
|
{"string", "set string", OFFSET(string), AV_OPT_TYPE_STRING, { .str = "default" }, CHAR_MIN, CHAR_MAX, 1 }, |
|
|
|
@ -105,7 +105,7 @@ static const AVOption test_options[]= { |
|
|
|
|
{"bin", "set binary value", OFFSET(binary), AV_OPT_TYPE_BINARY, { .str="62696e00" }, 0, 0, 1 }, |
|
|
|
|
{"bin1", "set binary value", OFFSET(binary1), AV_OPT_TYPE_BINARY, { .str=NULL }, 0, 0, 1 }, |
|
|
|
|
{"bin2", "set binary value", OFFSET(binary2), AV_OPT_TYPE_BINARY, { .str="" }, 0, 0, 1 }, |
|
|
|
|
{"num64", "set num 64bit", OFFSET(num64), AV_OPT_TYPE_INT64, { .i64 = 1 }, 0, 100, 1 }, |
|
|
|
|
{"num64", "set num 64bit", OFFSET(num64), AV_OPT_TYPE_INT64, { .i64 = 1 }, -1, 100, 1 }, |
|
|
|
|
{"flt", "set float", OFFSET(flt), AV_OPT_TYPE_FLOAT, { .dbl = 1.0 / 3 }, 0, 100, 1 }, |
|
|
|
|
{"dbl", "set double", OFFSET(dbl), AV_OPT_TYPE_DOUBLE, { .dbl = 1.0 / 3 }, 0, 100, 1 }, |
|
|
|
|
{"bool1", "set boolean value", OFFSET(bool1), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, 1 }, |
|
|
|
@ -380,10 +380,17 @@ int main(void) |
|
|
|
|
"bin=boguss", |
|
|
|
|
"bin=111", |
|
|
|
|
"bin=ffff", |
|
|
|
|
"num=bogus", |
|
|
|
|
"num=44", |
|
|
|
|
"num=44.4", |
|
|
|
|
"num=-1", |
|
|
|
|
"num=-2", |
|
|
|
|
"num=101", |
|
|
|
|
"num64=bogus", |
|
|
|
|
"num64=44", |
|
|
|
|
"num64=44.4", |
|
|
|
|
"num64=-1", |
|
|
|
|
"num64=-2", |
|
|
|
|
"num64=101", |
|
|
|
|
"flt=bogus", |
|
|
|
|
"flt=2", |
|
|
|
|