mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
Add video dimensions to the filename of encoder reconstruction.
This commit is contained in:
parent
965d8c377a
commit
1b2705a042
|
@ -138,6 +138,17 @@ int main(int argc, char *argv[])
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// Add dimensions to the reconstructions file name.
|
||||
if (cfg->debug != NULL) {
|
||||
char dim_str[50]; // log10(2^64) < 20, so this should suffice. I hate C.
|
||||
size_t left_len, right_len;
|
||||
sprintf(dim_str, "_%dx%d.yuv", cfg->width, cfg->height);
|
||||
left_len = strlen(cfg->debug);
|
||||
right_len = strlen(dim_str);
|
||||
realloc(cfg->debug, left_len + right_len + 1);
|
||||
strcpy(cfg->debug + left_len, dim_str);
|
||||
}
|
||||
|
||||
// Do more validation to make sure the parameters we have make sense.
|
||||
if (!config_validate(cfg)) {
|
||||
config_destroy(cfg);
|
||||
|
|
Loading…
Reference in a new issue