fixed some little bugs

This commit is contained in:
Edward Emelianov
2023-04-02 18:47:54 +03:00
parent 290e95b76a
commit 87e8120122
5 changed files with 8 additions and 8 deletions

View File

@@ -516,7 +516,7 @@ static hresult formathandler(int fd, const char *key, const char *val){
char buf[64];
frameformat fmt;
if(val){
if(strcmp(key, CMD_FRAMEMAX)) return RESULT_BADKEY; // can't set maxformat
if(0 == strcmp(key, CMD_FRAMEMAX)) return RESULT_BADKEY; // can't set maxformat
if(4 != sscanf(val, "%d,%d,%d,%d", &fmt.xoff, &fmt.yoff, &fmt.w, &fmt.h)) return RESULT_BADVAL;
fmt.w -= fmt.xoff; fmt.h -= fmt.yoff;
int r = camera->setgeometry(&fmt);