From 0780d3832997056b581cdecb29e605132fae9417 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 2 Dec 2017 03:58:04 +0100 Subject: 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. --- video/hwdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/hwdec.c') 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; } -- cgit v1.2.3