diff options
author | wm4 <wm4@nowhere> | 2017-12-02 03:58:04 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-12-02 04:53:51 +0100 |
commit | 0780d3832997056b581cdecb29e605132fae9417 (patch) | |
tree | 340313db84f48ed4d7f43a7601cfc27e4f7347a8 /video/hwdec.c | |
parent | 8b3dbab19eafee2da3685bb0a8550db448fad757 (diff) | |
download | mpv-0780d3832997056b581cdecb29e605132fae9417.tar.bz2 mpv-0780d3832997056b581cdecb29e605132fae9417.tar.xz |
hwdec: don't require setting legacy hwdec fields
With the recent changes, mpv's internal mechanisms got synced to
libavcodec's once more. Some things are still needed for filters (until
the mechanism gets replaced), but there's no need to require other hwdec
methods to use these fields. So remove them where they are unnecessary.
Also fix some minor leaks in the dxva2 backends, and set the driver_name
field in the Apple ones. Untested on Apple crap.
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 5d4073ad64..79714f60e0 100644 --- a/video/hwdec.c +++ b/video/hwdec.c @@ -40,7 +40,7 @@ struct mp_hwdec_ctx *hwdec_devices_get(struct mp_hwdec_devices *devs, struct mp_hwdec_ctx *res = NULL; pthread_mutex_lock(&devs->lock); for (int n = 0; n < devs->num_hwctxs; n++) { - if (devs->hwctxs[n]->type == type) { + if (type && devs->hwctxs[n]->type == type) { res = devs->hwctxs[n]; break; } |