1
mirror of https://github.com/mpv-player/mpv synced 2024-10-22 08:51:57 +02:00

vo_opengl: always preload hwdec interop

Simplifies some auto detection matters.

I _still_ don't want to remove the lazy loading mechanism, because it's
still slightly useful for filters using the hwdec APIs. My main
motivation for not always preloading them is actually that libva prints
random useless crap to the terminal with no way to prevent this.
This commit is contained in:
wm4 2015-11-09 11:57:11 +01:00
parent 7d5282ea5d
commit 76e50f6a3d

View File

@ -37,6 +37,7 @@
#include "common/common.h"
#include "misc/bstr.h"
#include "common/msg.h"
#include "common/global.h"
#include "options/m_config.h"
#include "vo.h"
#include "video/mp_image.h"
@ -439,9 +440,11 @@ static int preinit(struct vo *vo)
p->hwdec_info.load_api = call_request_hwdec_api;
p->hwdec_info.load_api_ctx = vo;
if (vo->opts->hwdec_preload_api != HWDEC_NONE) {
p->hwdec =
gl_hwdec_load_api_id(p->vo->log, p->gl, vo->opts->hwdec_preload_api);
int hwdec = vo->opts->hwdec_preload_api;
if (hwdec == HWDEC_NONE)
hwdec = vo->global->opts->hwdec_api;
if (hwdec != HWDEC_NONE) {
p->hwdec = gl_hwdec_load_api_id(p->vo->log, p->gl, hwdec);
gl_video_set_hwdec(p->renderer, p->hwdec);
if (p->hwdec)
p->hwdec_info.hwctx = p->hwdec->hwctx;