diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2024-02-10 23:46:04 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-03-09 05:58:52 +0000 |
commit | 391261f7576ff2abc738cf8d566bdc8aad267f1f (patch) | |
tree | aeee31dab84ead2dd19370668e5d924fe1820e9f /video/filter | |
parent | 120b0ac4125859fc5bfb555e73ffd4f8905fe881 (diff) | |
download | mpv-391261f7576ff2abc738cf8d566bdc8aad267f1f.tar.bz2 mpv-391261f7576ff2abc738cf8d566bdc8aad267f1f.tar.xz |
mp_image: add mp_image_params_static_equal for finer comparision
In case of dynamic HDR metadata is present.
Diffstat (limited to 'video/filter')
-rw-r--r-- | video/filter/refqueue.c | 2 | ||||
-rw-r--r-- | video/filter/vf_gpu.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/video/filter/refqueue.c b/video/filter/refqueue.c index 3cfe3c61ff..f5124087c6 100644 --- a/video/filter/refqueue.c +++ b/video/filter/refqueue.c @@ -333,7 +333,7 @@ bool mp_refqueue_can_output(struct mp_refqueue *q) if (!q->in_format || !!q->in_format->hwctx != !!img->hwctx || (img->hwctx && img->hwctx->data != q->in_format->hwctx->data) || - !mp_image_params_equal(&q->in_format->params, &img->params)) + !mp_image_params_static_equal(&q->in_format->params, &img->params)) { q->next = img; q->eof = true; diff --git a/video/filter/vf_gpu.c b/video/filter/vf_gpu.c index dba4b3204f..e19faaef42 100644 --- a/video/filter/vf_gpu.c +++ b/video/filter/vf_gpu.c @@ -166,12 +166,14 @@ static struct mp_image *gpu_render_frame(struct mp_filter *f, struct mp_image *i bool need_reconfig = m_config_cache_update(priv->vo_opts_cache); - if (!mp_image_params_equal(&priv->img_params, &in->params)) { - priv->img_params = in->params; + if (!mp_image_params_static_equal(&priv->img_params, &in->params)) { gl_video_config(priv->renderer, &in->params); need_reconfig = true; } + if (!mp_image_params_equal(&priv->img_params, &in->params)) + priv->img_params = in->params; + if (need_reconfig) { struct mp_rect src, dst; struct mp_osd_res osd; |