From 075aa21797e459b82bc95eb2c9336adfb8d562d0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 7 Mar 2018 22:39:51 +0100 Subject: vd_lavc: slightly better logging about why hwdec is not used The old message was outdated and also not very precise. Make it all a bit more elaborate. --- video/decode/vd_lavc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'video/decode/vd_lavc.c') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 94ddb384bd..5a8c2d53c5 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -417,7 +417,12 @@ static void select_and_set_hwdec(struct mp_filter *vd) bool hwdec_auto_copy = bstr_equals0(opt, "auto-copy"); bool hwdec_auto = hwdec_auto_all || hwdec_auto_copy; - if (hwdec_codec_allowed(vd, codec) && hwdec_requested) { + if (!hwdec_requested) { + MP_VERBOSE(vd, "No hardware decoding requested.\n"); + } else if (!hwdec_codec_allowed(vd, codec)) { + MP_VERBOSE(vd, "Not trying to use hardware decoding: codec %s is not " + "on whitelist.\n", codec); + } else { struct hwdec_info *hwdecs = NULL; int num_hwdecs = 0; add_all_hwdec_methods(&hwdecs, &num_hwdecs); @@ -472,10 +477,9 @@ static void select_and_set_hwdec(struct mp_filter *vd) } talloc_free(hwdecs); - } else { - MP_VERBOSE(vd, "Not trying to use hardware decoding: codec %s is not " - "on whitelist, or does not support hardware acceleration.\n", - codec); + + if (!ctx->use_hwdec) + MP_VERBOSE(vd, "No hardware decoding available for this codec.\n"); } if (ctx->use_hwdec) { -- cgit v1.2.3