From 391261f7576ff2abc738cf8d566bdc8aad267f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sat, 10 Feb 2024 23:46:04 +0100 Subject: mp_image: add mp_image_params_static_equal for finer comparision In case of dynamic HDR metadata is present. --- player/video.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'player') diff --git a/player/video.c b/player/video.c index 908299baa1..777460dcea 100644 --- a/player/video.c +++ b/player/video.c @@ -1043,14 +1043,6 @@ static void apply_video_crop(struct MPContext *mpctx, struct vo *vo) } } -static bool video_reconfig_needed(struct mp_image_params a, - struct mp_image_params b) -{ - a.color.hdr = (struct pl_hdr_metadata){0}; - b.color.hdr = (struct pl_hdr_metadata){0}; - return !mp_image_params_equal(&a, &b); -} - void write_video(struct MPContext *mpctx) { struct MPOpts *opts = mpctx->opts; @@ -1173,7 +1165,7 @@ void write_video(struct MPContext *mpctx) // Filter output is different from VO input? struct mp_image_params *p = &mpctx->next_frames[0]->params; - if (!vo->params || video_reconfig_needed(*p, *vo->params)) { + if (!vo->params || !mp_image_params_static_equal(p, vo->params)) { // Changing config deletes the current frame; wait until it's finished. if (vo_still_displaying(vo)) { vo_request_wakeup_on_done(vo); -- cgit v1.2.3