diff options
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r-- | video/decode/vd_lavc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 2593e50285..9ef49c25e1 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -200,19 +200,24 @@ static struct vd_lavc_hwdec *probe_hwdec(struct dec_video *vd, bool autoprobe, { struct vd_lavc_hwdec *hwdec = find_hwcodec(api); if (!hwdec) { - MP_VERBOSE(vd, "Requested hardware decoder not " - "compiled.\n"); + MP_VERBOSE(vd, "Requested hardware decoder not compiled.\n"); return NULL; } int r = hwdec_probe(hwdec, &vd->hwdec_info, decoder); + if (r == HWDEC_ERR_EMULATED) { + if (autoprobe) + return NULL; + // User requested this explicitly. + MP_WARN(vd, "Using emulated hardware decoding API.\n"); + r = 0; + } if (r >= 0) { return hwdec; } else if (r == HWDEC_ERR_NO_CODEC) { 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.\n"); } return NULL; } |