From 5629ed81eed90f95a04bb3d8ff64f135bd186651 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Fri, 18 Mar 2022 11:22:12 -0700 Subject: 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. --- video/out/gpu/hwdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/out') diff --git a/video/out/gpu/hwdec.c b/video/out/gpu/hwdec.c index 4217bad16a..9b994bc0a1 100644 --- a/video/out/gpu/hwdec.c +++ b/video/out/gpu/hwdec.c @@ -244,7 +244,7 @@ void ra_hwdec_ctx_init(struct ra_hwdec_ctx *ctx, struct mp_hwdec_devices *devs, * obviously no interops will need to be loaded later. * * Finally, if a specific interop is requested, it will be loaded now, and - * no other interop will be loaded, even if requested later. + * other interops can be loaded, if requested later. */ if (!type || !type[0] || strcmp(type, "auto") == 0) { if (!load_all_by_default) -- cgit v1.2.3