summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-20 22:26:57 +0200
committerwm4 <wm4@nowhere>2015-06-20 22:26:57 +0200
commit991af7dfb10c514a10d84f5a3e2698e646eb53d4 (patch)
tree03816e23f1b58bad4b6ca0249006d953096acd0a /video/decode
parentb17b8ff7fe91be294ffb229c0c143da7a6425fca (diff)
downloadmpv-991af7dfb10c514a10d84f5a3e2698e646eb53d4.tar.bz2
mpv-991af7dfb10c514a10d84f5a3e2698e646eb53d4.tar.xz
video: reduce error message when loading hwdec backend fails
When using --hwdec=auto, about half of all systems will print: "[vdpau] Error when calling vdp_device_create_x11: 1" this happens because usually mpv will be linked against both vdpau and vaapi libs, but the drivers are not necessarily available. Then trying to load a driver will fail. This is a normal part of probing, but the error messages were printed anyway. Silence them by explicitly distinguishing probing. This pretty much goes through all the layers. We actually consider loading hw backends for vo_opengl always "auto probed", even if a hw backend is explicitly requested. In this case vd_lavc will print a warning message anyway (adjust this message a bit).
Diffstat (limited to 'video/decode')
-rw-r--r--video/decode/vaapi.c2
-rw-r--r--video/decode/vd_lavc.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/video/decode/vaapi.c b/video/decode/vaapi.c
index bcc03aeaa4..0a9250c900 100644
--- a/video/decode/vaapi.c
+++ b/video/decode/vaapi.c
@@ -307,7 +307,7 @@ static bool create_va_dummy_ctx(struct priv *p)
VADisplay *display = vaGetDisplay(p->x11_display);
if (!display)
goto destroy_ctx;
- p->ctx = va_initialize(display, p->log);
+ p->ctx = va_initialize(display, p->log, true);
if (!p->ctx) {
vaTerminate(display);
goto destroy_ctx;
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index bbe6734c19..7c5c4ec8dc 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -252,10 +252,11 @@ static struct vd_lavc_hwdec *probe_hwdec(struct dec_video *vd, bool autoprobe,
if (r >= 0) {
return hwdec;
} else if (r == HWDEC_ERR_NO_CODEC) {
- MP_VERBOSE(vd, "Hardware decoder '%s' not found in "
- "libavcodec.\n", decoder);
+ MP_VERBOSE(vd, "Hardware decoder '%s' not found in libavcodec.\n",
+ decoder);
} else if (r == HWDEC_ERR_NO_CTX && !autoprobe) {
- MP_WARN(vd, "VO does not support requested hardware decoder.\n");
+ MP_WARN(vd, "VO does not support requested hardware decoder, or "
+ "loading it failed.\n");
}
return NULL;
}