From 3acd253e896206c79cd0c46ba93bf29219f61aa8 Mon Sep 17 00:00:00 2001 From: llyyr Date: Tue, 3 Sep 2024 19:26:28 +0530 Subject: mp_image: don't restore image params if they're unknown --- video/mp_image.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'video/mp_image.c') diff --git a/video/mp_image.c b/video/mp_image.c index b809dae765..fbe536dafe 100644 --- a/video/mp_image.c +++ b/video/mp_image.c @@ -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; -- cgit v1.2.3