summaryrefslogtreecommitdiffstats
path: root/filters/f_output_chain.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2022-03-18 11:22:12 -0700
committerPhilip Langdale <github.philipl@overt.org>2022-09-21 09:39:34 -0700
commit5629ed81eed90f95a04bb3d8ff64f135bd186651 (patch)
tree1749b94103493f83f3f19540491305fef5fe6d6f /filters/f_output_chain.c
parente50db4292795de511531e764d7e609c1a37a204f (diff)
downloadmpv-5629ed81eed90f95a04bb3d8ff64f135bd186651.tar.bz2
mpv-5629ed81eed90f95a04bb3d8ff64f135bd186651.tar.xz
filters: support loading new hwdec_interops from filters
If we want to be able to handle conversion between hw formats in filter chains, then we need to be able to load hwdec_interops from filters, as the VO is only ever going to initialise one interop, based on its configuration. That means that in almost all situations, only one of the required interops will be loaded at the time the filter is initialised. The existing code has some assumptions that new hwdec_interops will not be loaded after the vo has picked one to use. This change fixes two instances: * Refusing to load a new hwdec_interop if there is at least one loaded already. * Not recalculating the set of formats known to the autoconvert filter when a new output format shows up. This leads to autoconvert not knowing that a new format is supported when the hwdec interop is lazily loaded.
Diffstat (limited to 'filters/f_output_chain.c')
-rw-r--r--filters/f_output_chain.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/filters/f_output_chain.c b/filters/f_output_chain.c
index 468bfe6466..de01c954d7 100644
--- a/filters/f_output_chain.c
+++ b/filters/f_output_chain.c
@@ -106,16 +106,16 @@ static void check_in_format_change(struct mp_user_filter *u,
if (u == p->input) {
p->public.input_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.
- update_output_caps(p);
} 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.
+ update_output_caps(p);
+
p->public.reconfig_happened = true;
}
}