mirror of
https://github.com/mpv-player/mpv
synced 2025-01-02 04:42:10 +00:00
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.
This commit is contained in:
parent
5196c34aec
commit
6047333f0b
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user