summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-12-10 23:56:29 +0200
committerJan Ekström <jeebjp@gmail.com>2017-12-11 20:44:59 +0200
commit6047333f0bf2df869df9b4e479be9656ddc90f7e (patch)
treed7b7fe6dfbae8bc0f7a32126e792141445bf7121 /video/out
parent5196c34aecd55a705e3f978b47ddb7f1c1329d58 (diff)
downloadmpv-6047333f0bf2df869df9b4e479be9656ddc90f7e.tar.bz2
mpv-6047333f0bf2df869df9b4e479be9656ddc90f7e.tar.xz
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.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/gpu/video.c3
1 files changed, 1 insertions, 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];