diff options
author | Philip Langdale <philipl@overt.org> | 2022-03-24 14:18:59 -0700 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2022-09-21 09:39:34 -0700 |
commit | e50db4292795de511531e764d7e609c1a37a204f (patch) | |
tree | 86215376579b077db945452b40042abca54081d6 /video/filter/vf_vdpaupp.c | |
parent | 7f2bc43a686ef59d2e6ea1a7a5cf95b55ee10d71 (diff) | |
download | mpv-e50db4292795de511531e764d7e609c1a37a204f.tar.bz2 mpv-e50db4292795de511531e764d7e609c1a37a204f.tar.xz |
vo: hwdec: do hwdec interop lookup by image format
It turns out that it's generally more useful to look up hwdecs by image
format, rather than device type. In the situations where we need to
find one, we generally know the image format we're dealing with. Doing
this avoids us having to create mappings from image format to device
type.
The most significant part of this change is filling in the image format
for the various hw interops. There is a hw_imgfmt field today today, but
only a couple of the interops fill it in, and that seems to be because
we've never actually used this piece of metadata before. Well, now we
have a good use for it.
Diffstat (limited to 'video/filter/vf_vdpaupp.c')
-rw-r--r-- | video/filter/vf_vdpaupp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/filter/vf_vdpaupp.c b/video/filter/vf_vdpaupp.c index 2f485bdbad..6de8671e39 100644 --- a/video/filter/vf_vdpaupp.c +++ b/video/filter/vf_vdpaupp.c @@ -136,7 +136,7 @@ static struct mp_filter *vf_vdpaupp_create(struct mp_filter *parent, void *optio p->queue = mp_refqueue_alloc(f); - AVBufferRef *ref = mp_filter_load_hwdec_device(f, AV_HWDEVICE_TYPE_VDPAU); + AVBufferRef *ref = mp_filter_load_hwdec_device(f, IMGFMT_VDPAU); if (!ref) goto error; p->ctx = mp_vdpau_get_ctx_from_av(ref); |