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 /filters/f_output_chain.c | |
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 'filters/f_output_chain.c')
-rw-r--r-- | filters/f_output_chain.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/filters/f_output_chain.c b/filters/f_output_chain.c index ffad932a57..6c14ebc12b 100644 --- a/filters/f_output_chain.c +++ b/filters/f_output_chain.c @@ -100,27 +100,29 @@ static void check_in_format_change(struct mp_user_filter *u, struct mp_image *img = frame.data; if (!mp_image_params_equal(&img->params, &u->last_in_vformat)) { - MP_VERBOSE(p, "[%s] %s\n", u->name, - mp_image_params_to_str(&img->params)); - u->last_in_vformat = img->params; - if (u == p->input) { p->public.input_params = img->params; } else if (u == p->output) { p->public.output_params = img->params; } - // Unfortunately there's no good place to update these. - // But a common case is enabling HW decoding, which - // might init some support of them in the VO, and update - // the VO's format list. - // - // But as this is only relevant to the "convert" filter, don't - // do this for the other filters as it is wasted work. - if (strcmp(u->name, "convert") == 0) - update_output_caps(p); - - p->public.reconfig_happened = true; + if (!mp_image_params_static_equal(&img->params, &u->last_in_vformat)) { + MP_VERBOSE(p, "[%s] %s\n", u->name, + mp_image_params_to_str(&img->params)); + + // Unfortunately there's no good place to update these. + // But a common case is enabling HW decoding, which + // might init some support of them in the VO, and update + // the VO's format list. + // + // But as this is only relevant to the "convert" filter, don't + // do this for the other filters as it is wasted work. + if (strcmp(u->name, "convert") == 0) + update_output_caps(p); + + p->public.reconfig_happened = true; + } + u->last_in_vformat = img->params; } } |