mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Fail encoder init when CQM file cannot be opened
This commit is contained in:
parent
db5e750c7f
commit
97863cdaa2
|
@ -203,12 +203,14 @@ encoder_control_t* kvz_encoder_control_init(kvz_config *const cfg) {
|
||||||
kvz_scalinglist_init(&encoder->scaling_list);
|
kvz_scalinglist_init(&encoder->scaling_list);
|
||||||
|
|
||||||
// CQM
|
// CQM
|
||||||
{
|
if (cfg->cqmfile) {
|
||||||
FILE* cqmfile;
|
FILE* cqmfile = fopen(cfg->cqmfile, "rb");
|
||||||
cqmfile = cfg->cqmfile ? fopen(cfg->cqmfile, "rb") : NULL;
|
|
||||||
if (cqmfile) {
|
if (cqmfile) {
|
||||||
kvz_scalinglist_parse(&encoder->scaling_list, cqmfile);
|
kvz_scalinglist_parse(&encoder->scaling_list, cqmfile);
|
||||||
fclose(cqmfile);
|
fclose(cqmfile);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "Could not open CQM file.\n");
|
||||||
|
goto init_failed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
kvz_scalinglist_process(&encoder->scaling_list, encoder->bitdepth);
|
kvz_scalinglist_process(&encoder->scaling_list, encoder->bitdepth);
|
||||||
|
|
Loading…
Reference in a new issue