summaryrefslogtreecommitdiffstats
path: root/video/mp_image.c
diff options
context:
space:
mode:
authorllyyr <llyyr.public@gmail.com>2024-09-03 19:26:28 +0530
committerKacper Michajłow <kasper93@gmail.com>2024-09-03 17:08:28 +0200
commit3acd253e896206c79cd0c46ba93bf29219f61aa8 (patch)
treea98721b4a585d9df38de59281c468e15b11cb8bf /video/mp_image.c
parentfe4ba71962bd69e1c3bc56bd16b3b58b0db12268 (diff)
downloadmpv-3acd253e896206c79cd0c46ba93bf29219f61aa8.tar.bz2
mpv-3acd253e896206c79cd0c46ba93bf29219f61aa8.tar.xz
mp_image: don't restore image params if they're unknown
Diffstat (limited to 'video/mp_image.c')
-rw-r--r--video/mp_image.c2
1 files changed, 2 insertions, 0 deletions
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;