File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -1938,8 +1938,20 @@ void show_encoder_help(string const &name) {
19381938 return ;
19391939 }
19401940 while (opt->name != nullptr ) {
1941- cout << (opt->offset == 0 ? " \t\t * " : " \t - " );
1942- col () << SBOLD (opt->name ) << (opt->help != nullptr && strlen (opt->help ) > 0 ? " - " s + opt->help : " " s) << " \n " ;
1941+ string default_val;
1942+ if (opt->offset != 0 ) {
1943+ if (opt->type == AV_OPT_TYPE_FLOAT || opt->type == AV_OPT_TYPE_DOUBLE) {
1944+ default_val = to_string (opt->default_val .dbl ) + " F" ;
1945+ } else if (opt->type == AV_OPT_TYPE_CONST || opt->type == AV_OPT_TYPE_INT64 || opt->type == AV_OPT_TYPE_INT || opt->type == AV_OPT_TYPE_BOOL) {
1946+ default_val = to_string (opt->default_val .i64 );
1947+ } else if (opt->type == AV_OPT_TYPE_STRING && opt->default_val .str != nullptr ) {
1948+ default_val = string (" \" " ) + opt->default_val .str + " \" " ;
1949+ }
1950+ if (!default_val.empty ()) {
1951+ default_val = " , default " + default_val;
1952+ }
1953+ }
1954+ col () << (opt->offset == 0 ? " \t\t * " : " \t - " ) << SBOLD (opt->name ) << (opt->help != nullptr && strlen (opt->help ) > 0 ? " - " s + opt->help : " " s) << default_val << " \n " ;
19431955 opt++;
19441956 }
19451957 if (name == " libx264" || name == " libx265" ) {
You can’t perform that action at this time.
0 commit comments