File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -524,11 +524,10 @@ parse_fmt(char *fmt, struct parsed_opts *opts)
524
524
} str_to_uint = { .fourcc = 0 };
525
525
memcpy (str_to_uint .str , fmt , MIN (strlen (fmt ), 4 ));
526
526
opts -> pixelformat = str_to_uint .fourcc ;
527
- } else if (strncmp (item , "size=" , strlen ("size=" )) == 0 ) {
528
- if (strchr (item , 'x' )) {
529
- opts -> width = atoi (item + strlen ("size=" ));
530
- opts -> height = atoi (strchr (item , 'x' ) + 1 );
531
- }
527
+ } else if (strstr (item , "size=" ) == item &&
528
+ strchr (item , 'x' ) != NULL ) {
529
+ opts -> width = atoi (strchr (item , '=' ) + 1 );
530
+ opts -> height = atoi (strchr (item , 'x' ) + 1 );
532
531
} else if (strncmp (item , "tpf=" , strlen ("tpf=" )) == 0 ) {
533
532
opts -> numerator = atoi (item + strlen ("tpf=" ));
534
533
opts -> denominator = strchr (item , '/' ) == NULL
You can’t perform that action at this time.
0 commit comments