From 6047333f0bf2df869df9b4e479be9656ddc90f7e Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 10 Dec 2017 23:56:29 +0200 Subject: video: remove code duplication by calling a hwdec loader helper Make gl_video_load_hwdecs() call gl_video_load_hwdecs_all() when all HW decoders should be loaded. --- video/out/gpu/video.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index fb290bc266..d9f1b80ae6 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -3886,8 +3886,7 @@ void gl_video_load_hwdecs(struct gl_video *p, struct mp_hwdec_devices *devs, if (strcmp(type, "no") == 0) { // do nothing, just block further loading } else if (strcmp(type, "all") == 0) { - for (int n = 0; ra_hwdec_drivers[n]; n++) - load_add_hwdec(p, devs, ra_hwdec_drivers[n], true); + gl_video_load_hwdecs_all(p, devs); } else { for (int n = 0; ra_hwdec_drivers[n]; n++) { const struct ra_hwdec_driver *drv = ra_hwdec_drivers[n]; -- cgit v1.2.3