diff options
author | Philip Langdale <philipl@overt.org> | 2022-03-18 11:22:12 -0700 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2022-09-21 09:39:34 -0700 |
commit | 5629ed81eed90f95a04bb3d8ff64f135bd186651 (patch) | |
tree | 1749b94103493f83f3f19540491305fef5fe6d6f /video/hwdec.c | |
parent | e50db4292795de511531e764d7e609c1a37a204f (diff) | |
download | mpv-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 'video/hwdec.c')
-rw-r--r-- | video/hwdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/hwdec.c b/video/hwdec.c index 1b15c95c64..246117a4f1 100644 --- a/video/hwdec.c +++ b/video/hwdec.c @@ -94,7 +94,7 @@ void hwdec_devices_set_loader(struct mp_hwdec_devices *devs, void hwdec_devices_request_for_img_fmt(struct mp_hwdec_devices *devs, struct hwdec_imgfmt_request *params) { - if (devs->load_api && !hwdec_devices_get_first(devs)) + if (devs->load_api) devs->load_api(devs->load_api_ctx, params); } |