mp_image: don't restore image params if they're unknown

This commit is contained in:
llyyr 2024-09-03 19:26:28 +05:30 committed by Kacper Michajłow
parent fe4ba71962
commit 3acd253e89
1 changed files with 2 additions and 0 deletions

View File

@ -852,6 +852,8 @@ bool mp_image_params_static_equal(const struct mp_image_params *p1,
// before dovi mapping.
void mp_image_params_restore_dovi_mapping(struct mp_image_params *params)
{
if (!params->primaries_orig || !params->transfer_orig || !params->sys_orig)
return;
params->color.primaries = params->primaries_orig;
params->color.transfer = params->transfer_orig;
params->repr.sys = params->sys_orig;